FEAT: imag and real getters for QuadPrecision#208
Conversation
|
@seberg needed your opinion here >>> from numpy_quaddtype import *
>>> QuadPrecision(1).imag
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[2], line 1
----> 1 QuadPrecision(1).imag
RuntimeError: Using legacy SETITEM with NULL array object is only supported for basic NumPy DTypes.Will it be fine to approach these by setting the getters as |
|
This makes sense, but for array support we need something more. I am interested in that too (soon), though. I suspect an ArrayMethod or even ufunc makes sense, but for ufunc need to add view support there (should be possible, but not sure it's worth it). |
|
Nice, yeah make sense, will be happy to extend this in NumPy whenever you feel right! |
|
Merging this in |
|
Do we have tests for this? |
|
One thing that might help for ensuring new code has tests is to look at integrating coverage testing. That way you would have gotten a test failure here because the coverage went down. |
I know coverage.py does something like this (never used it though) is that what you recommending? |
|
To get coverage of native code you need to use a native coverage tool like gcov or llvm-cov. But yeah, something like that. There's also codecov.io, which has some fancier features to display the results and add diagnostics to PRs. |
closes numpy/numpy-quaddtype#16