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

TST: Handle warnings #218

Closed pllim closed 3 years ago

pllim commented 3 years ago
<frozen importlib._bootstrap>:219
  <frozen importlib._bootstrap>:219: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 80 from C header, got 88 from PyObject

stginga/tests/test_utils.py::TestInterpBadPix::test_algo[nearest-2]
  /home/runner/work/stginga/stginga/stginga/tests/test_utils.py:43: DeprecationWarning: `np.float` is a deprecated alias for the builtin `float`. To silence this warning, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    [7, 8, 9]], dtype=np.float)

stginga/tests/test_utils.py::TestStuffWithFITS::test_scale_image_with_dq
stginga/tests/test_utils.py::test_dq_parser
  /home/runner/work/stginga/stginga/stginga/utils.py:196: DeprecationWarning: `np.str` is a deprecated alias for the builtin `str`. To silence this warning, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    self._sdcol: [ascii.convert_numpy(np.str)],

stginga/tests/test_utils.py::TestStuffWithFITS::test_scale_image_with_dq
stginga/tests/test_utils.py::test_dq_parser
  /home/runner/work/stginga/stginga/stginga/utils.py:197: DeprecationWarning: `np.str` is a deprecated alias for the builtin `str`. To silence this warning, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    self._ldcol: [ascii.convert_numpy(np.str)]})

stginga/tests/test_utils.py::TestStuffWithFITS::test_scale_image_with_dq
stginga/tests/test_utils.py::test_dq_parser
  /home/runner/work/stginga/stginga/stginga/utils.py:234: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    data = np.asarray(data, dtype=np.int)  # Ensure int array

stginga/tests/test_utils.py::TestStuffWithFITS::test_scale_image_with_dq
  /home/runner/work/stginga/stginga/stginga/utils.py:509: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    edge_mask = np.ones_like(dq, dtype=np.bool)

stginga/tests/test_utils.py::TestStuffWithFITS::test_scale_image_with_dq
  /home/runner/work/stginga/stginga/stginga/utils.py:512: DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    badpix_mask = np.zeros_like(dq, dtype=np.bool)