diff --git a/pykeops/pykeops/common/lazy_tensor.py b/pykeops/pykeops/common/lazy_tensor.py index 791c5a2da..61b2368ea 100644 --- a/pykeops/pykeops/common/lazy_tensor.py +++ b/pykeops/pykeops/common/lazy_tensor.py @@ -179,9 +179,9 @@ def __init__(self, x=None, axis=None): ) if typex == self.tools.arraytype and len(x.shape) == 0: - x = x.view(1) + x = x.reshape(1) elif typex in self.tools.float_types: - x = self.tools.arraytype([x]).view(1) + x = self.tools.arraytype([x]).reshape(1) if typex == self.tools.arraytype: if len(x.shape) >= 3: # Infer axis from the input shape