Skip to content

Commit

Permalink
Use "np.transpose" instead of ".T".
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Nov 17, 2022
1 parent 85e9277 commit f454229
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions colour/utilities/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -2031,8 +2031,9 @@ def tstack(
dtype = cast(Type[DTypeFloating], optional(dtype, DEFAULT_FLOAT_DTYPE))

a = as_array(a, dtype)

if a.ndim <= 2:
return a.T
return np.transpose(a)

return np.concatenate([x[..., None] for x in a], axis=-1)

Expand Down Expand Up @@ -2099,7 +2100,7 @@ def tsplit(
a = as_array(a, dtype)

if a.ndim <= 2:
return a.T
return np.transpose(a)

return np.transpose(
a,
Expand Down

0 comments on commit f454229

Please sign in to comment.