Giter Site home page Giter Site logo

Comments (2)

jriehl avatar jriehl commented on June 23, 2024

There are many Numpy function not currently supported, and numpy.zeros() is no exception. The work around is to use an output parameter, similar to the example in fbcorr.py (modulo the "return" statement, see issue #21). For example:

def recontruct4DCore(ps,A,B,P0, output):
  n1,n3,n4 = ps.shape
  n2=A.shape[0]
  for j in range(n2):
    Afact=A[j]*P0
    for i in range(n1):
      for k in range(n3):
        for l in range(n4):
          output[i,j,k,l]=ps[i,k,l]*B[j]+Afact

Use numpy.zeros() outside the call to this function to create the output array, and it should work (not sure if shape support handles indexing that well, however).

from numba.

markflorisson avatar markflorisson commented on June 23, 2024

np.zeros is recognized now, but a dtype argument needs to be passed in. This is also documented, so I'm closing this for now.

from numba.

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.