polish linspace

This commit is contained in:
lidongyang 2022-07-28 22:50:36 +08:00 committed by Jittor
parent 19ec9d0a4e
commit c59351f171
1 changed files with 1 additions and 1 deletions

View File

@ -1177,7 +1177,7 @@ def numpy_cumprod(a, dim):
def linspace(start, end, steps):
res = jt.index((steps,))[0]
res = res*(end-start)/float(steps-1)+start
res = res*float((end-start)/(steps-1))+start
return res
def randperm(n, dtype="int32"):