'list' object has no attribute 'shape'

后端 未结 7 773
执笔经年
执笔经年 2020-12-07 22:13

how to create an array to numpy array?

def test(X, N):
    [n,T] = X.shape
    print \"n : \", n
    print \"T : \", T



if __name__==\"__main__\":

    X =         


        
7条回答
  •  眼角桃花
    2020-12-07 22:52

    İf you have list, you can print its shape as if it is converted to array

    import numpy as np
    print(np.asarray(X).shape)
    

提交回复
热议问题