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.edi...@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@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to