AttributeError: 'numpy.ndarray' object has no attribute 'magnitude'
Hello!
I installed equilibrator_api 0.2.6 and tried without success to run the examples from the showcase Jupyter Notebook. In particular, I got the following traceback for the part "3 Max-min Driving Force (MDF) example":
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-4-c5d1368119ec> in <module>
13 p_h=p_h, ionic_strength=ionic_strength, temperature=temperature)
14
---> 15 mdf_data = pp.calc_mdf()
16 print(f"MDF = {mdf_data.mdf:.2f}")
17 mdf_data.compound_df
C:\Anaconda3\envs\equilibrator\lib\site-packages\equilibrator_api\pathway.py in calc_mdf(self, stdev_factor)
244 :return: a PathwayMDFData object with the results
245 """
--> 246 return PathwayThermoModel(self, stdev_factor).FindMDF()
247
248 @property
C:\Anaconda3\envs\equilibrator\lib\site-packages\equilibrator_api\thermo_models.py in __init__(self, pathway, stdev_factor)
289 ), "uncertainty in dG required for all reactions"
290
--> 291 self.I_dir = np.diag(np.sign(self.pathway.fluxes.magnitude))
292 self.Nr_active = sum(self.pathway.fluxes.T != 0)
293
AttributeError: 'numpy.ndarray' object has no attribute 'magnitude'
This is on Win10, with equilibrator_api installed via pip (and python-levenshtein via conda), and numpy 1.18.1.
I saw that you're in the middle of pushing pathway-related stuff to equilibrator_pathway. Is there any way to perform MDF analysis in this other package? How should I proceed?