raiseValueError('Shape mismatch: "out" should have shape starting with %s (plus %i extra dimensions), but the value produced by "perform" has shape %s'\
%(shape,self.ndim_added,rval.shape))
out[0]=rval
defgrad(self,inputs,outputs):
defgrad(self,inputs,outputs):
return[Noneforiininputs]
return[Noneforiininputs]
...
@@ -314,6 +340,9 @@ def permutation_helper(random_state, n, shape):
...
@@ -314,6 +340,9 @@ def permutation_helper(random_state, n, shape):
# is a long, the numpy permutation function will crash on Windows.
# is a long, the numpy permutation function will crash on Windows.
n=int(n.item())
n=int(n.item())
ifshapeisNone:
# Draw only one permutation, equivalent to shape = ()