Coder Social home page Coder Social logo

Comments (1)

xman avatar xman commented on July 17, 2024

Hi Robert,

Thanks for your feedback. Didn't see the feedback until now.

I was initially started with building posit as numpy extension. I was able to get the basic stuffs working, but the ufunc type resolving and other issues that I have forgotten now didn't work the same for native dtype and extended dtype through dtype registration API. The functions that are defined through PyNumberMethods are working well. But there are a whole list of ufunc in the numpy/core/code_generators/generate_umath.py that I didn't manage to get them work with non-standard dtype. The PyUFunc_FromFuncAndData didn't allow me to define for non-standard dtypes.

As we currently use floating as the number category for posits, it does create some confusions on the coercion e.g. posit32 and float32 are same byte size, the current numpy type system thinks posit32 (with 4 bytes and also floating category) is the same as float32, hence mess up in the type resolving.

I'll check out the numpy-quaternion to see if there are something I missed. I do hope the posit can be integrated as extension as that will avoid whole lot of other problems that you described. I'm aware of the pypi issue that the dependencies will mess up.

Once we have a consensus on the best method to merge into upstream, I'll like to update and do that merging as an optional numpy feature.

In summary, my previous main issues with building posit as numpy extension were on getting the whole list of ufunc to work seamlessly with new posit dtype, and the type coercion needs to work correctly.

Thanks again for your feedback.

Regards,
Shin Yee

from numpy-posit.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.