Normalize numpy array columns in python reading that array from other csv file -


whenever trying perform normalization on array obtained csv file . code wont work because have n't provided custom file.

i getting error message :

 x = np.myarray  

attributeerror: 'module' object has no attribute'myarray'

as new python ,can please me how normalized matrix if read matrix csv file ?

 import numpy np  import csv   open('csvk.csv', 'rb') f:      reader = csv.reader(f)     data_as_list = list(reader)      print data_as_list      myarray = np.asarray(data_as_list)     print myarray     x = np.myarray     x_normed = x / x.max(axis=0)     print x_normed 

what trying np.myarray? attribute call, , python rightly informs module numpy not have attribute myarray. if you're trying make copy of myarray want x=myarray, although same in more pythonic way x_normed=myarray/myarray.max(axis=0)


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -