ValueError: could not broadcast input array from shape (224,224,3) into shape (224,224)

前端 未结 6 1481
闹比i
闹比i 2020-11-27 19:23

I have a list say, temp_list with following properties :

len(temp_list) = 9260  
temp_list[0].shape = (224,224,3)  

Now, when I am conver

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 19:44

    You can covert numpy.ndarray to object using astype(object)

    This will work:

    >>> a = [np.zeros((224,224,3)).astype(object), np.zeros((224,224,3)).astype(object), np.zeros((224,224,13)).astype(object)]
    

提交回复
热议问题