Skip to content

Fix deprecation warnings on tests. #84

@ambarb

Description

@ambarb
tests/test_image.py::test_images_mean
  /nsls2/users/abarbour/Repos/csxtools/tests/test_image.py:85: 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.
    x = np.array([np.repeat(ii*np.ones(ii*100, dtype=np.float32), 400).reshape(

tests/test_image.py::test_images_sum
  /nsls2/users/abarbour/Repos/csxtools/tests/test_image.py:92: 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.
    x = np.array([np.repeat(ii*np.ones(ii*100, dtype=np.float32), 400).reshape(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions