Closed conorheins closed 4 weeks ago
Creating an object array from a list of numpy arrays seems to break if the component arrays of the list have matching leading axis. For example
arrs = [np.zeros((3, 6)), np.zeros((3, 4, 5))] obj_arr = np.array(arrs, dtype=object)
will throw the following error:
ValueError: could not broadcast input array from shape (3,6) into shape (3,)
whereas
arrs = [np.zeros((4, 6)), np.zeros((3, 4, 5))] obj_arr = np.array(arrs, dtype=object)
works just fine.
Creating an object array from a list of numpy arrays seems to break if the component arrays of the list have matching leading axis. For example
will throw the following error:
whereas
works just fine.