-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
Description
I have created a wrapper library to utilize the Posit datatype defined by this project as a custom datatype in NumPy (Python).
In this example file you may observe:
from posit8_2 import posit8_2 as p8 #importing the datatype library in PythonThen the datatype is used as follows:
a = np.array([0.33, 0.25, 0.025, 0.0025, 0.00025], dtype=np.float32)
b = a.astype(p8) # implicit cast from NumPy float32 to Posit<8,2>Current problems with the library:
- I use an old build procedure
- The current vesion is specifically for Posit<8,2>, will need help though, to make it generic
Notwithstanding the above, the library is ready to use, once built (using the present method).
I wanted to inquire the following:
- If this is useful for the community
- Whether stillwater would want to add this officially
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog