python-gwyfile/Fix_depreciated_fromstring_warning.patch
Tomáš Chvátal c628ab5d37 Accepting request 827000 from home:andythe_great
Uncertain to why it failed on leap 15.1
Also, did I fix the fromstring warning correctly?
Thanks

OBS-URL: https://build.opensuse.org/request/show/827000
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-gwyfile?expand=0&rev=1
2020-08-17 06:29:06 +00:00

13 lines
538 B
Diff

diff -ruN a/gwyfile/objects.py b/gwyfile/objects.py
--- a/gwyfile/objects.py 2017-02-20 02:36:19.000000000 +0700
+++ b/gwyfile/objects.py 2020-08-16 16:39:00.455203869 +0700
@@ -348,7 +348,7 @@
}
dtype = typelookup[typecode]
pos, endpos = endpos, endpos + dtype.itemsize * numitems
- data = np.fromstring(buf[pos:endpos], dtype=dtype)
+ data = np.frombuffer(buf[pos:endpos], dtype=dtype)
elif typecode == 'S':
numitems = struct.unpack('<I', buf[pos:pos + 4])[0]
endpos += 4