Skip to content

Commit

Permalink
update np transopose
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZyne committed Oct 24, 2024
1 parent 8865c10 commit afdc514
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/transpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def sp_transpose(arr):

def np_transpose(arr):
brr = arr.transpose()
return numpy.ravel(brr).reshape(brr.shape)
return brr.copy()


def initialize(np, row, col, dtype):
arr = np.arange(0, row * col, dtype=dtype)
arr = np.arange(0, row * col, 1, dtype=dtype)
return np.reshape(arr, (row, col))


Expand Down

0 comments on commit afdc514

Please sign in to comment.