spacetelescope / stginga

Ginga products specific to STScI data analysis.
https://stginga.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6 stars 10 forks source link

MNT: VisibleDeprecationWarning Creating an ndarray from ragged nested sequences (numpy 1.19) #192

Closed pllim closed 4 years ago

pllim commented 4 years ago

Need to find out where is warning is coming from and mitigate it.


2020-07-18 15:43:19,162 | I | local_plugin_mixin.py:287 (load_params) |
    backgroundsub parameters loaded from .../ztmp_annulus_bg.json
2020-07-18 15:43:19,197 | W | warnings.py:109 (_showwarnmsg) |
    .../numpy/core/_asarray.py:83: 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
        return array(a, dtype, copy=False, order=order)

2020-07-18 15:43:28,979 | I | BackgroundSub.py:738 (sub_bg) |
    5.672848224639893 subtracted from ...
2020-07-18 15:43:29,137 | W | warnings.py:109 (_showwarnmsg) |
    .../numpy/core/_asarray.py:83: 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
        return array(a, dtype, copy=False, order=order)

2020-07-18 15:43:36,629 | I | Control.py:1289 (channel_image_updated) | Channel image update: 0.0002 sec
2020-07-18 15:43:36,723 | W | warnings.py:109 (_showwarnmsg) |
    .../numpy/core/_asarray.py:83: 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
        return array(a, dtype, copy=False, order=order)
pllim commented 4 years ago

Looks like this happens in Ginga. Moving to ejeschke/ginga#868