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
The second line of the program fragment below succeeds if b is a regular numpy array
but generates a TypeError if b is a memory mapped array (memmap).
m2 = b.mean()
print("The mean of b is {:f}.".format(m2))
TypeError: non-empty format string passed to object.format
The work around is a specific type change as
print("The mean of b is {:f}.".format(float(m2)))
A program demonstrating the success and failure is attached. I have observed the error in python 2.7 with numpy 1.10.4, python 3.5 with numpy 1.10.4, and pythion 3.5 with numpy 1.11.1.
I am running OS X 10.10.5.
The second line of the program fragment below succeeds if b is a regular numpy array
but generates a TypeError if b is a memory mapped array (memmap).
m2 = b.mean()
print("The mean of b is {:f}.".format(m2))
TypeError: non-empty format string passed to object.format
The work around is a specific type change as
print("The mean of b is {:f}.".format(float(m2)))
A program demonstrating the success and failure is attached. I have observed the error in python 2.7 with numpy 1.10.4, python 3.5 with numpy 1.10.4, and pythion 3.5 with numpy 1.11.1.
I am running OS X 10.10.5.
memmap_error.py.zip
The text was updated successfully, but these errors were encountered: