xman / numpy-posit Goto Github PK
View Code? Open in Web Editor NEWThis project forked from numpy/numpy
posit (unum type III) integrated Numpy
Home Page: https://www.numpy.org/
License: Other
This project forked from numpy/numpy
posit (unum type III) integrated Numpy
Home Page: https://www.numpy.org/
License: Other
Hello!
I am an occasional numpy core developer, and I have a couple of questions and suggestions that might help getting this work used in the numpy community.
First, do you need this to be a fork of numpy? I haven't reviewed all of your modifications, but it seems to me that you are mostly adding a new dtype for posits. numpy does have the facility for new dtypes to be added by third-party packages without having to modify numpy itself. The support isn't necessarily the greatest, but if you run into issues, we'd like to hear about them; we would like to fix them to make life easier for you. You can see the numpy-quaternion
package as an example of providing a new dtype. We very much encourage this approach.
If you do need to modify numpy itself, do you intend to propose merging this work into upstream numpy? If so, I recommend following the git workflow outlined in the Numpy Developer's Guide. Specifically, in your Github fork, leave the master
branch untouched and work in a separate branch. This will help you stay up to date with upstream development and facilitate comparisons with the mainline development through the Github interface. When you are ready, you can just make a PR to numpy.
The problem with maintaining a true fork of numpy is that users are going to have problems deploying packages that depend on numpy-posit
and other packages that depend on numpy
proper. pip
and other package management tools don't necessarily work particularly well in such cases.
In any case, I wish you the best of luck! I look forward to experimenting with posits in the future! Thank you for your attention.
The current comparisons are based on float16 implementations which check for NAN.
I want to use posit as a kind of data type in deep learning, so I want to ask some questions.
(1) How many es-bits does the posit have? For example, is posit8 posit<8, 0>, posit<8, 1> or other types?
(2) How to enable or disable the FMA and Quire operation for posit?
(3) Does it support GPU acceleration?
Currently, posit32 data is converted to double, process, and converted back to posit32.
After saving a numpy array of dtype 'posit8' using numpy.savez, I am having trouble loading it back up using numpy.load. I get the following error,
Traceback (most recent call last):
File "/home/neo/src/numpyposit/numpy/lib/format.py", line 527, in _read_array_header
dtype = numpy.dtype(d['descr'])
TypeError: data type "<f1" not understood
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/neo/src/numpyposit/numpy/lib/npyio.py", line 251, in __getitem__
pickle_kwargs=self.pickle_kwargs)
File "/home/neo/src/numpyposit/numpy/lib/format.py", line 642, in read_array
shape, fortran_order, dtype = _read_array_header(fp, version)
File "/home/neo/src/numpyposit/numpy/lib/format.py", line 530, in _read_array_header
raise ValueError(msg % (d['descr'],))
ValueError: descr is not a valid dtype descriptor: '<f1'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.