Code Monkey home page Code Monkey logo

Comments (6)

leeping avatar leeping commented on July 23, 2024 1

Thanks. I only used matrices when matrix multiplications were actually needed, and converted them back shortly afterward. Otherwise it became too confusing to remember whether a variable somewhere was an array or a matrix. It should be straightforward to make the changes.

from geometric.

leeping avatar leeping commented on July 23, 2024

Thanks for the notification. This seems troublesome ... is there an easy way to patch the code while making sure all the linear algebra is still right?

from geometric.

dgasmith avatar dgasmith commented on July 23, 2024

Unfortunately not really. Changes like this are normally validated via a full test suite. You can also attempt to compare operational pathways directly by leaving the matrix operations in place, adding an array routine, and using a assert np.allclose for each call until you are satisfied the code is producing the same results.

from geometric.

dgasmith avatar dgasmith commented on July 23, 2024

You may be interested in the Python 3.5 @ operator. Otherwise np.dot or np.linalg.multi_dot are good alternatives.

from geometric.

leeping avatar leeping commented on July 23, 2024

Thanks for letting me know about this - it seems very nice, though I might prefer to use numpy.dot for now for Python 2.7 compatibility reasons.

from geometric.

leeping avatar leeping commented on July 23, 2024

Marking this as resolved, thanks again for the heads-up.

from geometric.

Related Issues (20)

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.