Skip to content

Commit

Permalink
Merge pull request victorlei#95 from AlexG31/patch-1
Browse files Browse the repository at this point in the history
bug fix: arange (when step < 0)
  • Loading branch information
victorlei authored Nov 5, 2016
2 parents 8153bb8 + 299b51b commit 796307e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smop/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,9 @@ def arange(start,stop,step=1,**kwargs):
>>> size(a)
matlabarray([[ 1, 10]])
"""
expand_value = 1 if step > 0 else -1
return matlabarray(np.arange(start,
stop+1,
stop+expand_value,
step,
**kwargs).reshape(1,-1),**kwargs)
def cat(*args):
Expand Down

0 comments on commit 796307e

Please sign in to comment.