mahmoudbustami
mahmoudbustami

Reputation: 35

Python declare numpy array 'tuple' is not callable (in jupyter notebook?)

Source:

import numpy as np
a = np.array([[11,12,13],[21,22,23]])

print(a)

Error on line 1:

TypeError: 'tuple' object is not callable

enter image description here

I do not understand what is going on here, since I wrote import numpy as np.

Upvotes: 1

Views: 1725

Answers (1)

wuser92
wuser92

Reputation: 579

I think you need to restart the Kernel through 'Kernel' -> 'Restart' because you might have saved 'a' into a variable 'print' like this before:

print = a

So now print is not the built-in print function anymore but a tuple

Upvotes: 4

Related Questions