From f4169b17b8180a9e970d202983c3c6fe93608d47 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 5 Aug 2024 13:52:51 +0300 Subject: [PATCH] Progress - new typeError emerged on a new line --- Model.py | 3 ++- __pycache__/Model.cpython-311.pyc | Bin 15278 -> 15371 bytes fitter.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Model.py b/Model.py index cc5f129..ca82f02 100644 --- a/Model.py +++ b/Model.py @@ -318,11 +318,12 @@ class Model: ] def mem_potential(self, t): + t = np.asarray(t) v1 = 0 t0 = 100 t1 = 350 n = (t // self.period) * self.period - return v1 if t0 + n <= t < t1 + n else self.V_mem_rest + return np.where((t0 + n <= t) & (t < t1 + n), v1, self.V_mem_rest) def get_initial_values(self): Cai_0 = 0.11712 # Cai diff --git a/__pycache__/Model.cpython-311.pyc b/__pycache__/Model.cpython-311.pyc index a9b49526f10b0eb184bf563919ccdc8aeafdcdc8..6b87e5c96ab9d7d863a8cc1f514701be8e46aece 100644 GIT binary patch delta 552 zcmZ2i-d(}FoR^o20SHppZb*yX$a_XrmJP^b2I9|~fW&l$5=I~e1zC)fj3i8I8B-W* znNpZ)nNyf+S!x(-7_yjPDyo1i6h12hLoI6w<77rrQFG=R)+(UF8pdp}nLwQ^5Rq)K z_9~!g4HHl|3(T}-KzFQWp6sJ0E6rLI2o$}=o>-h%RFqg*Bo5-SmS?0ErB2RQ^B0Z* z@*5cL^6>R|O(^X2?eXnkoP0!0N&7CpU{A#ip&5xY#TFROl3pRWB4~r+%CJ>Z7bQ$K zB<)byqkoa#>k7Zu1rD#x(&|l&j2@fkX}B^nCTxD9d6%7W)#O8l>lw>87a7ShF{W&u zX!3_yU<1&qqRk-UIf&Rhd9H;FW98&s7N$aMtlo?t7?4PT$^R_8CI?wMs;vR3T?-;O zK?FOH&}1pP17hC=5%)mE{mJVsbs4WrzH4b5@B%1si#0btB{ipL9Z1pwM3{pJOAxUh zNZevAD9X$$ffxgE4M@rxM0f&;UmP|-14?sJ?TS84POyqL2xVgw{=k5p{0J8Rf-GAw I`L)$y0Oci*yZ`_I delta 541 zcmeCKSXa)woR^o20SKbEuShf5$a_Y$o*Bpk;m-v?Vmd<#V=Yq(Q!R4}b1h2^V+}(V zP!s~Hm>3vP_^b>JwX8MFHLO)Y1vQMxOchMoj3Bi|oHZ;E(QL5RBGx=6Mut458m2rp zpb20#Acio}83$;Z_E*&>0A28PKR>Pj{@M8#()P7Iq-ctKPXh%SN2 z1x70v7n(uX5OE;cQPfeiqGV0|1rEC+Z=eCmjFTC;MK(`RPiJIw-~2qRhM!h%s1P_>02^Xh3OBs$J2C d$$PD$4MNx$g+DN0CqIJ4zaY!zP4=)p3;?flgf9R9 diff --git a/fitter.py b/fitter.py index bdb2852..f1634e6 100644 --- a/fitter.py +++ b/fitter.py @@ -69,7 +69,7 @@ class Fitter: ) states = self.initial_values - t = model.tspan + t = [0, 1000] V = model.mem_potential(t) _calc_curr = model.calculated_current(states, t, V) calculated_current = (