Coder Social home page Coder Social logo

technologicat / python-wlsqm Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 4.0 777 KB

Weighted least squares meshless interpolator and differentiator.

License: BSD 2-Clause "Simplified" License

Python 2.81% C 0.03% Cython 97.16%
numerical interpolation differentiation curve-fitting least-squares meshless numpy cython python python2

python-wlsqm's People

Contributors

davidcaron avatar technologicat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-wlsqm's Issues

Python 3.6 build error

Fails to compile under Python 3.6. See #2.

High priority now that Python 3.4 official support has ended (in March 2019), and many new-ish installed pythons are at least 3.6.

Update contact email

The contact email in setup.py is outdated. PyPI uses it to provide the link to email the maintainer. Update it for the next release.

build error

brilliant work!but I have some problems
python3.6
pip install wlsqm

wlsqm/utils/lapackdrivers.pyx:1740:38: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                         ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:42: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                            ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:45: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                                        ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:57: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                                              ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:63: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                                                          ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:75: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                                                                 ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:82: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                                                                         ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:90: Converting to Python object not allowed without gil

Error compiling Cython file:
------------------------------------------------------------
...
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, &worksize, &lwork, &info )
    lwork  = <int>worksize
    cdef double* p_work = <double*>malloc( lwork*sizeof(double) )

    # LDA(A) = n
    dgesvd( &jobu, &jobvt, &m, &n, A, &m, S, <double*>0, &ldu, <double*>0, &ldvt, p_work, &lwork, &info )
                                                                                                 ^
------------------------------------------------------------

wlsqm/utils/lapackdrivers.pyx:1740:98: Converting to Python object not allowed without gil
Traceback (most recent call last):
  File "setup.py", line 220, in <module>
    gdb_debug = debug ),
  File "/home/duan/miniconda3/envs/cv/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1097, in cythonize
    cythonize_one(*args)
  File "/home/duan/miniconda3/envs/cv/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1220, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: wlsqm/utils/lapackdrivers.pyx

use python3.4
successful installed, but

>>> import wlsqm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/duan/PycharmProjects/vessel/python-wlsqm/wlsqm/__init__.py", line 26, in <module>
    from .fitter.defs   import *  # definitions (constants) (common)
ImportError: No module named 'wlsqm.fitter.defs'
>>> 

ValueError: Buffer and memoryview are not contiguous in the same dimension.

I try to use this code to form the derivates of my meshless scattered data cloud of CFD.
x is the ndarray[37817,2].
F is the value of x ndarray[37817,].

when input the data in the expertsolver_example.py.
the error occurs:

/home/wjq/MeshlessDerivatives/main.py
Traceback (most recent call last):
File "/home/wjq/MeshlessDerivatives/main.py", line 183, in
main()
File "/home/wjq/MeshlessDerivatives/main.py", line 177, in main
X,Y,Z = project_onto_regular_grid_2D(x, F, fit_order=2, nk=50)
File "/home/wjq/MeshlessDerivatives/main.py", line 92, in project_onto_regular_grid_2D
solver.prepare( xi=x, xk=x[hoods] ) # generate problem matrices from the geometry of the point cloud
File "wlsqm/fitter/expert.pyx", line 399, in wlsqm.fitter.expert.ExpertSolver.prepare
ValueError: Buffer and memoryview are not contiguous in the same dimension.

Process finished with exit code 1

Thanks!

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.