Closed
Description
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.
Metadata
Metadata
Assignees
Labels
No labels