Open durack1 opened 6 years ago
Inconceivable!
@dnadeau4 agreed, I too was flabbergasted at this discovery..
@durack1 my changed made everything failed on OSX, but passed on Linux. I have to revert.
@dnadeau4 weird, I wonder why the difference on platforms
This is still an issue on OSX CDAT 8.1/CDMS2 3.1.2:
bash-3.2$ source activate cdms2-312py2
(cdms2-312py2) bash-3.2$ python
Python 2.7.15 | packaged by conda-forge | (default, Feb 27 2019, 20:44:16)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cdms2 as cdm
Allow anonymous logging usage to help improve CDAT(you can also set the environment variable CDAT_ANONYMOUS_LOG to yes or no)? [yes]/no: no
>>> cdm.createAxis(cdm.createVariable([10.],id='height',missing=1e20))
/anaconda2/envs/cdms2-312py2/lib/python2.7/site-packages/cdms2/axis.py:826: UserWarning: genutil module not present, was not able to determine if axis is level based on units
"genutil module not present, was not able to determine if axis is level based on units")
/anaconda2/envs/cdms2-312py2/lib/python2.7/site-packages/numpy/ma/core.py:3174: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
dout = self.data[indx]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/anaconda2/envs/cdms2-312py2/lib/python2.7/site-packages/cdms2/axis.py", line 749, in __str__
return "\n".join(self.listall()) + "\n"
File "/anaconda2/envs/cdms2-312py2/lib/python2.7/site-packages/cdms2/axis.py", line 1743, in listall
result.append(' Length: ' + str(len(d)))
TypeError: object of type 'float' has no len()
I have just encountered a new problem with the
cdms2.createAxis
function as captured below:If I use a non-cdms transient variable as an input, this works fine:
However, if I try using a cdms transient variable as the input, I get the following error. This is new in
cdms2-2.12-np113py27_0
which was installed as part of thecmor331
release:The issue appears to occur in all releases dating back to 2.8.0 (so also 2.10 and 2.12)