sot / chandra_aca

Chandra Aspect Camera Tools
https://sot.github.io/chandra_aca
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays #166

Closed javierggt closed 7 months ago

javierggt commented 8 months ago

These are all the warnings that show up in Speedy testing

=============================== warnings summary ===============================
tests/test_maude_decom.py: 158 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -102 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 341 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -45 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 179 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -101 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 280 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -100 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 60 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -103 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 140 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -127 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -41 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 52 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -73 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 112 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -21 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 52 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -18 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 64 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -40 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 66 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -43 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 60 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -76 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 62 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -24 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 26 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -23 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 14 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -72 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 28 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -20 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 14 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -17 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
tests/test_maude_decom.py::test_dynbgd_decom
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -42 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 14 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -75 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 180 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -1 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 14 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -96 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py::test_imgtype_dnld[frames]
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:432: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -117 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    c = np.unpackbits(np.array(bits[:2], dtype=np.uint8))

tests/test_maude_decom.py: 28 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -93 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 14 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -25 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py::test_vcdu_rollover
tests/test_maude_decom.py::test_vcdu_rollover
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -15 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py: 12 warnings
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -16 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_maude_decom.py::test_repeated_frames
tests/test_maude_decom.py::test_repeated_frames
tests/test_maude_decom.py::test_repeated_frames
tests/test_maude_decom.py::test_repeated_frames
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/chandra_aca/maude_decom.py:399: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of -46 to uint8 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)
  will give the desired result (the cast overflows).
    bits = np.unpackbits(np.array(_unpack("BBBbbBB", bits), dtype=np.uint8))

tests/test_residuals.py::test_multi_ai
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/django/utils/encoding.py:266: DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead.
    encoding = locale.getdefaultlocale()[1] or 'ascii'

tests/test_residuals.py::test_multi_ai
  /export/jgonzale/github-workflows/miniconda3/envs/ska3-flight-2024.0rc7/lib/python3.11/site-packages/django/http/request.py:1: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
    import cgi

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
- generated xml file: /export/jgonzale/ska_testr/outputs/logs/Linux_2024-01-12T16-14-54_2024.0rc7-ac2117f_kady.cfa.harvard.edu/chandra_aca/test_unit.py.xml -
================ 202 passed, 1989 warnings in 60.76s (0:01:00) =================