-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Closed
Description
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.
mymartin, zqwzshm, jakirkham, sunaemon and nyngwangnyngwang
Metadata
Metadata
Assignees
Labels
No labels