Skip to content

Commit afdc514

Browse files
committed
update np transopose
1 parent 8865c10 commit afdc514

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/transpose.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ def sp_transpose(arr):
4646

4747
def np_transpose(arr):
4848
brr = arr.transpose()
49-
return numpy.ravel(brr).reshape(brr.shape)
49+
return brr.copy()
5050

5151

5252
def initialize(np, row, col, dtype):
53-
arr = np.arange(0, row * col, dtype=dtype)
53+
arr = np.arange(0, row * col, 1, dtype=dtype)
5454
return np.reshape(arr, (row, col))
5555

5656

0 commit comments

Comments
 (0)