Skip to content

Fixes a few warnings and depracations

Amir MOHAMMADI requested to merge warnings-and-deprecations into master

Fixes the following warnings and depracations

beat.backend.python/beat/backend/python/data.py:414: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/amir/idiap/git/beat/livedet2020-iris-beat-demo/prefix/cache/23/86/05/ce9947508c178d11aaabb2affee908e38dd13d072d0a6e2c736b925254.0.34.data.checksum' mode='rt' encoding='UTF-8'>
  expected_chksum = open(f_chck, "rt").read().strip()
beat.backend.python/beat/backend/python/baseformat.py:361: DeprecationWarning: np.asscalar(a) is deprecated since NumPy v1.16, use a.item() instead
  to_read = numpy.asscalar(dtype.itemsize*count)
beat.backend.python/beat/backend/python/baseformat.py:362: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
  a = numpy.fromstring(fd.read(to_read), dtype=data_format, count=count)

Merge request reports

Loading