[issue46593] memoryview lacks support for half floats

2022-01-31 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue46593] memoryview lacks support for half floats

2022-01-31 Thread Antoine Pitrou
New submission from Antoine Pitrou : The struct module has support for half-floats (the "e" format code) but support is not fully enabled in the memoryview object. Let's contrast float32 (the "f" format code), which you can cast to, and read as Python objects: >>> a = np.array([0.0, -1.5], n