diff --git a/src/galois/_domains/_ufunc.py b/src/galois/_domains/_ufunc.py index 72168b6da..7660a4a6e 100644 --- a/src/galois/_domains/_ufunc.py +++ b/src/galois/_domains/_ufunc.py @@ -394,7 +394,7 @@ def __call__(self, ufunc, method, inputs, kwargs, meta): self._verify_operands_in_field_or_int(ufunc, inputs, meta) inputs, kwargs = self._view_inputs_as_ndarray(inputs, kwargs) i = meta["non_field_operands"][0] # Scalar multiplicand - inputs[i] = np.mod(inputs[i], self.field.characteristic) + inputs[i] = np.mod(inputs[i], self.field.characteristic, dtype=meta["dtype"]) inputs, kwargs = self._view_inputs_as_ndarray(inputs, kwargs) output = getattr(self.ufunc, method)(*inputs, **kwargs) output = self._view_output_as_field(output, self.field, meta["dtype"])