The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

azima (1) [Avatar] Offline
Below line in python 2.7 does not work correctly and cause complication time error (shape not defined).
b = 0; m,n = shape(dataMatrix)
in python 2.7 you must use as below:

peter.harrington (82) [Avatar] Offline
Re: b = 0; m,n = shape(dataMatrix) problem in Python 2.7
Thanks for pointing this out.
I just tried it in a shell wilth Python 2.7.1 and it works fine.
Did you do:
>>>from numpy import *
>>>from numpy import shape
before you tried those commands?

Message was edited by: