You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
np.frombuffer has an example making a S1 array from "hello world". That works fine in Python 2, but in Python3 raises an error - the string object doesn't have a __buffer__ attribute.
s = b'hello world'
works.
I don't know if it is simpler to use separate PY2 and PY3 examples, or to come up with an example that doesn't highlight this difference. frombuffer is not usually needed by beginning to intermediate users, so an overly simple string/bytestring example might be more misleading than helpful.
np.frombuffer
has an example making aS1
array from "hello world". That works fine in Python 2, but in Python3 raises an error - the string object doesn't have a__buffer__
attribute.works.
I don't know if it is simpler to use separate PY2 and PY3 examples, or to come up with an example that doesn't highlight this difference.
frombuffer
is not usually needed by beginning to intermediate users, so an overly simple string/bytestring example might be more misleading than helpful.http://stackoverflow.com/questions/43362986/numpy-frombuffer-attributeerror-str-object-has-no-attribute-buffer
The text was updated successfully, but these errors were encountered: