Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array type issue at import when using PyPy #25

Closed
Apteryks opened this issue Sep 24, 2015 · 3 comments
Closed

Array type issue at import when using PyPy #25

Apteryks opened this issue Sep 24, 2015 · 3 comments

Comments

@Apteryks
Copy link

Here is the traceback:
[PyPy 2.6.1 with MSC v.1500 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.

import PyDAQmx
C:\Users\maco\virtualenvs\pypy\site-packages\numpy\linalg\lapack_lite.py:78: UserWarning: tuned lapack (openblas, atlas ...) not found, using lapack_lite
warnings.warn('tuned lapack (openblas, atlas ...) not found, using lapack_lite')
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\maco\virtualenvs\pypy\site-packages\PyDAQmx__init__.py", line 7, in
from DAQmxFunctions import *
File "C:\Users\maco\virtualenvs\pypy\site-packages\PyDAQmx\DAQmxFunctions.py", line 146, in
array_type(_type),2) for _type in type_list_array]
File "C:\Users\maco\virtualenvs\pypy\site-packages\PyDAQmx\DAQmxFunctions.py", line 111, in array_type
flags=('C_CONTIGUOUS','WRITEABLE'))
File "C:\Users\maco\virtualenvs\pypy\site-packages\numpy\ctypeslib.py", line 253, in ndpointer
elif isinstance(flags, flagsobj):
TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types

I'm using the Windows binary release of Pypy and installed numpy using: 'pip install git+https://bitbucket.org/pypy/numpy.git'. PyDAQmx was installed using 'pip install PyDAQmx' (v 1.3.1).

@clade
Copy link
Owner

clade commented Sep 24, 2015

Your error comes from the following command, which works well on C Python.

numpy.ctypeslib.ndpointer(numpy.int32, flags=('C_CONTIGUOUS', 'WRITEABLE'))

It seams to me that it is an error from the PyPy fork of numpy and not
from PyDAmx. You should try to ask them.

Le 24/09/2015 20:19, Apteryks a écrit :

Here is the traceback:
[PyPy 2.6.1 with MSC v.1500 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.

            import PyDAQmx
            C:\Users\maco\virtualenvs\pypy\site-packages\numpy\linalg\lapack_lite.py:78:
            UserWarning: tuned lapack (openblas, atlas ...) not
            found, using lapack_lite
            warnings.warn('tuned lapack (openblas, atlas ...) not
            found, using lapack_lite')
            Traceback (most recent call last):
            File "", line 1, in
            File
            "C:\Users\maco\virtualenvs\pypy\site-packages\PyDAQmx__init__.py",
            line 7, in
            from DAQmxFunctions import *
            File
            "C:\Users\maco\virtualenvs\pypy\site-packages\PyDAQmx\DAQmxFunctions.py",
            line 146, in
            array_type(_type),2) for _type in type_list_array]
            File
            "C:\Users\maco\virtualenvs\pypy\site-packages\PyDAQmx\DAQmxFunctions.py",
            line 111, in array_type
            flags=('C_CONTIGUOUS','WRITEABLE'))
            File
            "C:\Users\maco\virtualenvs\pypy\site-packages\numpy\ctypeslib.py",
            line 253, in ndpointer
            elif isinstance(flags, flagsobj):
            TypeError: isinstance() arg 2 must be a class, type,
            or tuple of classes and types

I'm using the Windows binary release of Pypy and installed numpy
using: 'pip install git+https://bitbucket.org/pypy/numpy.git'. PyDAQmx
was installed using 'pip install PyDAQmx' (v 1.3.1).


Reply to this email directly or view it on GitHub
#25.

@rlamy
Copy link

rlamy commented Sep 24, 2015

This particular issue should be solved in numpypy now, cf. https://bitbucket.org/pypy/numpy/commits/6b5083ac1859da3fab0e6229f8367ad544239896. However, I have no idea whether it's enough to get PyDAQmx working.

@Apteryks
Copy link
Author

@clade, thank you for your answer. You are right, this is on PyPy numpy side rather than in PyDAQmx. Feel free to close this issue!

@clade clade closed this as completed Sep 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants