![]() ![]() (Dec-03-2017, 08:16 PM)j.crater Wrote: First, when posting code here, please follow the instructions sparkz_alot posted at the bottom of your message. N_2 = len(X0) # ERROR > TypeError: object of type 'numpy.int64' has no len() ![]() N_1 = len(X0) # ERROR > TypeError: object of type 'numpy.int64' has no len() K = (np.cov(X0).size) # returns 1, not sure if that's correct ![]() I'm new to Python so maybe I'm missing something, but this code doesn't run with a simple example of two arrays: If you are using numpy array, try the "size" method, as suggested here:Īctually, I just found some code online that is supposed to do the "Box's M" statistical test on co-variant matrices. You will need to convert it or use a different method of obtaining list length. (Dec-03-2017, 04:11 PM)j.crater Wrote: "len() of unsized object" error generally means that the object, of which length you want to know, does not support this method - in your case it is np.cov("some_list"). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |