Skip to content

Commit

Permalink
Problems with float_ and int_ from np. Changed them for now
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriciocravo committed Jul 15, 2024
1 parent 04ecf3f commit fa2f6c6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
18 changes: 5 additions & 13 deletions for_local_use.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,16 @@
import os
import basico
import pint
from numpy import issubdtype, floating, integer, array


if __name__ == '__main__':

# Used for Model 56
try:
_S1 = BaseSpecies()
except SystemExit:
print('Nice')
idk = array([1, 2, 3])

S0, S1, S2 = BaseSpecies()

S0 >> Zero [1]
S1 >> Zero [1]
S2 >> Zero [1]

S = Simulation(S0 | S1 | S2)
print(S.compile())
for a in idk:
print(issubdtype(a, floating))
print(issubdtype(a, integer))



2 changes: 1 addition & 1 deletion mobspy/modules/meta_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
MobsPyExpression as me_MobsPyExpression, Specific_Species_Operator as me_Specific_Species_Operator, \
ExpressionDefiner as me_ExpressionDefiner
from mobspy.modules.mobspy_parameters import Mobspy_Parameter as mp_Mobspy_Parameter
from numpy import int_ as np_int_, float_ as np_float_
from numpy import integer as np_int_, floating as np_float_
from inspect import stack as inspect_stack
from mobspy.modules.meta_class_utils import unite_characteristics as mcu_unite_characteristics, \
combine_references as mcu_combine_references, \
Expand Down
2 changes: 1 addition & 1 deletion mobspy/modules/mobspy_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
from scipy.constants import N_A
from copy import deepcopy
from numpy import int_ as np_int_, float_ as np_float_, add as np_add, subtract as np_subtract, \
from numpy import integer as np_int_, floating as np_float_, add as np_add, subtract as np_subtract, \
multiply as np_multiply, divide as np_divide
import time

Expand Down
2 changes: 1 addition & 1 deletion mobspy/modules/set_counts_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from mobspy.modules.meta_class import List_Species, Species, Reacting_Species
from mobspy.modules.mobspy_parameters import Mobspy_Parameter as mp_Mobspy_Parameter
from pint import Quantity
from numpy import int_ as np_int_, float_ as np_float_
from numpy import integer as np_int_, floating as np_float_


def set_counts(count_dic):
Expand Down

0 comments on commit fa2f6c6

Please sign in to comment.