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

cdms2 file variable does not support var.ndim #191

doutriaux1 opened this Issue Nov 13, 2017 · 2 comments


None yet
3 participants

doutriaux1 commented Nov 13, 2017

In [1]: import cdms2,sys,os,vcs,cdat_info

In [2]:,"share","cdutil",""))

In [3]: v=f['sftlf']

In [4]: v.ndim
AttributeError                            Traceback (most recent call last)
<ipython-input-4-a70ea5f09b56> in <module>()
----> 1 v.ndim

AttributeError: 'FileVariable' object has no attribute 'ndim'

rank has been deprecated

@doutriaux1 doutriaux1 added this to the 3.0 milestone Nov 13, 2017


This comment has been minimized.


dnadeau4 commented Feb 13, 2018

This is no documentation or any source code for ndim attribute. u



@dnadeau4 dnadeau4 closed this Feb 13, 2018


This comment has been minimized.


durack1 commented Feb 13, 2018

@dnadeau4 it seems in the example below, it inherits numpy behavior.. Might be good to document this

In [1]: import numpy as np
In [2]: import cdms2 as cdm
In [5]: npVar = np.ones([10,10])
In [6]: cdVar = cdm.createVariable(npVar,id='cdVar')
In [7]: npVar.ndim
Out[7]: 2
In [8]: cdVar.ndim
Out[8]: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment