File: numpy2.patch

package info (click to toggle)
ont-fast5-api 4.1.3%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,576 kB
  • sloc: python: 3,806; makefile: 153; sh: 13
file content (15 lines) | stat: -rw-r--r-- 681 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: add patch for Numpy 2.x support
Author: Alexandre Detiste <tchet@debian.org>
Last-Update: 2025-02-03

--- 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: