Creating ragged arrays throws a VisibleDeprecationWarning. A few examples below. I think this should be an easy fix by providing dtype=object at the time of creation, but I wanted to open discussion on if folks think this would break downstream code. Happy to drop these in and run some tests.
/export/seas-home/justinjm/software/enspara/enspara/ra/ra.py:502: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify dtype=object when creating the ndarray
array = np.array(list(array))
/export/seas-home/justinjm/software/enspara/enspara/ra/ra.py:453: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify dtype=object when creating the ndarray
[np.arange(start, stops[num], step) for num in first_dimension_iis])
/export/seas-home/justinjm/software/enspara/enspara/ra/ra.py:462: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify dtype=object when creating the ndarray
for i in range(len(iis_2d_lengths))])), dtype=int)
EDIT current versions of software-
python version 3.6.13
numpy version 1.19.5
Creating ragged arrays throws a VisibleDeprecationWarning. A few examples below. I think this should be an easy fix by providing
dtype=object
at the time of creation, but I wanted to open discussion on if folks think this would break downstream code. Happy to drop these in and run some tests./export/seas-home/justinjm/software/enspara/enspara/ra/ra.py:502: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify
dtype=object
when creating the ndarray array = np.array(list(array))/export/seas-home/justinjm/software/enspara/enspara/ra/ra.py:453: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify
dtype=object
when creating the ndarray [np.arange(start, stops[num], step) for num in first_dimension_iis])/export/seas-home/justinjm/software/enspara/enspara/ra/ra.py:462: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify
dtype=object
when creating the ndarray for i in range(len(iis_2d_lengths))])), dtype=int)EDIT current versions of software- python version 3.6.13 numpy version 1.19.5