File: numpy2.patch

package info (click to toggle)
ont-fast5-api 4.1.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,556 kB
  • sloc: python: 3,799; makefile: 152; sh: 13
file content (11 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
--- a/ont_fast5_api/data_sanitisation.py
+++ b/ont_fast5_api/data_sanitisation.py
@@ -28,7 +28,7 @@
     if isinstance(data, str):
         # Plain python-strings can be encoded trivially
         return data.encode()
-    elif isinstance(data, np.ndarray) and data.dtype.kind == np.dtype(np.unicode_):
+    elif isinstance(data, np.ndarray) and data.dtype.kind == np.dtype(np.str_):
         # If the array is all of one type, unicode-string, we can encode with numpy
         return data.astype('S')
     elif isinstance(data, np.ndarray) and len(data.dtype) > 1: