-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test astk_interface.py not running with initialize_stand #29
Comments
Can you provide a test? |
Here is a test (thks @HowcanoeWang): see issue #27 >>> from alinea.adel.astk_interface import AdelWheat
>>> from alinea.astk.Weather import sample_weather
>>> adel = AdelWheat(nsect=2)
>>> g = adel.setup_canopy(100)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hwang/miniconda3/envs/adel/lib/python3.9/site-packages/alinea.adel-1.9.0-py3.9.egg/alinea/adel/astk_interface.py", line 154, in setup_canopy
g = self.build_mtg(canopy, stand,
File "/home/hwang/miniconda3/envs/adel/lib/python3.9/site-packages/alinea.adel-1.9.0-py3.9.egg/alinea/adel/adel.py", line 226, in build_mtg
g = mtg_factory(parameters, stand=stand, leaf_sectors=self.nsect,
File "/home/hwang/miniconda3/envs/adel/lib/python3.9/site-packages/alinea.adel-1.9.0-py3.9.egg/alinea/adel/newmtg.py", line 532, in mtg_factory
if args.get('HS_final') < args.get('nff'):
TypeError: '>' not supported between instances of 'numpy.ndarray' and 'numpy.str_' |
@mlabadie : This works on my computer (Mac). @HowcanoeWang: What is your operating system? Win, Mac, Linux? |
@pradal @HowcanoeWang I tested using my pre-existing Conda environment and creating a new environment with the installation of alinea.adel from the Conda Openalea3 channel. In [6]: from alinea.astk.Weather import sample_weather
In [7]: from alinea.adel.astk_interface import AdelWheat
In [8]: adel = AdelWheat(nsect=2)
In [9]: g = adel.setup_canopy(age=100)
In [10]: g.display()
MTG : nb_vertices=23, nb_scales=6
/plant1 (id=1)
^/MS (id=2)
^/metamer1 (id=3)
^/internode (id=4)
^/HiddenElement (id=5)
^<StemElement (id=6)
+sheath (id=7)
^/HiddenElement (id=8)
^<StemElement (id=9)
^<blade (id=10)
^/HiddenElement (id=11)
^<LeafElement1 (id=12)
^<LeafElement2 (id=13)
^<metamer2 (id=14)
^/internode (id=15)
^/HiddenElement (id=16)
^<StemElement (id=17)
+sheath (id=18)
^/HiddenElement (id=19)
^<StemElement (id=20)
^<blade (id=21)
^/HiddenElement (id=22) |
Yes. But it fails with g = adel.setup_canopy(age=1000) |
@christian34 Some warnings are introduce from rpy2 (Sorry in french)
|
…oblems R/Python and it has to be fixed.
Ubuntu in Windows Linux Subsystem. ===== Emm, strange. It works today. And I could not reproduce the error. |
Error:
The text was updated successfully, but these errors were encountered: