1

I am using numpy in an Anaconda virtual env , Python 3.3.2 The following code gives me a 'NoneType' object not callable error

I read through this post but I did not find a solution Comparing two numpy arrays for equality, element-wise

np.array_equal(np.array([1, 2]), np.array([1, 2]))

I get the same error with the array_equiv method below

np.array_equiv(np.array([1, 2]), np.array([1, 2]))
Community
  • 1
  • 1
webmaker
  • 456
  • 1
  • 5
  • 15
  • Could you try `print(type(np.array), repr(np.array))` and edit your question to show the results? – DSM Apr 04 '16 at 18:58
  • thanks for the reply. I am using anaconda with a 3D cad program so it may be the CAD program that is causing the issues. `type(array1)` gives `` – webmaker Apr 04 '16 at 19:20
  • The end goal is to write an if statement `if np.array_equiv(array1, array2)` – webmaker Apr 04 '16 at 19:23
  • I didn't ask about `type(array1)` (which isn't even in your code..) – DSM Apr 04 '16 at 19:24
  • You need to find the `None` object or attribute. `None(np.array([1,2,]))` produces the same error. – hpaulj Apr 04 '16 at 19:27
  • 1
    @hpaulj: I wondered if it was `_equal` or `_equiv` too, but if the OP is right and it happens with both, I thought it's more likely that `array` has been rebound than either of those. But since the mention of `array1` makes me suspect we're not seeing the real code which generates the errors, all bets are off.. – DSM Apr 04 '16 at 19:29
  • in this 3D CAD program, I am unable to `print(type(np.array))` . Instead I use `self.theLw.WriteLine(str(type(array)))` which prints to console `` – webmaker Apr 04 '16 at 19:38
  • `None(np.array([1,2,]))` does produce a 'None type' object not callable error – webmaker Apr 04 '16 at 19:41

0 Answers0