[Numpy-discussion] Casting scalars
Hameer Abbasi
einstein.edison at gmail.com
Thu May 10 22:53:33 EDT 2018
Yes, that I know. I meant given a dtype string such as 'uint8' or a
dtype object. I know I can possibly do np.array(scalar,
dtype=dtype)[()] but I was looking for a less hacky method. On
11/05/2018 at 07:50, Stuart wrote: np.float(scalar) On Thu, May 10,
2018 at 7:49 PM Hameer Abbasi <einstein.edison at gmail.com> wrote:
Hello, everyone! I might be missing something and this might be a very
stupid and redundant question, but is there a way to cast a scalar to
a given dtype? Hameer _______________________________________________
NumPy-Discussion mailing list NumPy-Discussion at python.org
https://mail.python.org/mailman/listinfo/numpy-discussion
More information about the NumPy-Discussion
mailing list