Code Monkey home page Code Monkey logo

cyarray's People

Contributors

adityapb avatar kunal-puri avatar nauaneed avatar prabhuramachandran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cyarray's Issues

Build Error

Facing a local build (and pip install) error with cyarray.

Details

carray.pyx is throwing a Cython.Compiler.Errors.CompileError, due to two kinds of error:

  • Cannot assign type 'double' to 'long'. Fix: Use int division (//) in the corresponding .mako file
  • Assignment to a read-only property. Fix: To be identified.

Error message

generating file D:\OSS\cyarray\cyarray\carray.pxd from D:\OSS\cyarray\cyarray\carray.pxd.mako
generating file D:\OSS\cyarray\cyarray\carray.pyx from D:\OSS\cyarray\cyarray\carray.pyx.mako

Compiling cyarray/carray.pyx because it changed.
[1/1] Cythonizing cyarray/carray.pyx
C:\Users\prajw\miniconda3\envs\sph39\lib\site-packages\Cython\Compiler\Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: D:\OSS\cyarray\cyarray\carray.pxd
  tree = Parsing.p_module(s, pxd, full_module_name)
warning: cyarray\carray.pyx:63:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310

Error compiling Cython file:
------------------------------------------------------------
...

    else:

        if 64%item_size == 0:

            return (n*item_size/64 + 1)*64/item_size
                                          ^
------------------------------------------------------------

cyarray\carray.pyx:159:42: Cannot assign type 'double' to 'long'

Error compiling Cython file:
------------------------------------------------------------
...

            return (n*item_size/64 + 1)*64/item_size

        else:

            return (n*item_size/64 + 1)*64
                                       ^
------------------------------------------------------------

cyarray\carray.pyx:163:39: Cannot assign type 'double' to 'long'

Error compiling Cython file:
------------------------------------------------------------
...

            self.data = self._old_data

            self._old_data = NULL

            self._npy_array.data = <char *>self.data
                           ^
------------------------------------------------------------

cyarray\carray.pyx:907:27: Assignment to a read-only property

Error compiling Cython file:
------------------------------------------------------------
...

            self.data = self._old_data

            self._old_data = NULL

            self._npy_array.data = <char *>self.data
                           ^
------------------------------------------------------------

cyarray\carray.pyx:1917:27: Assignment to a read-only property

Error compiling Cython file:
------------------------------------------------------------
...

            self.data = self._old_data

            self._old_data = NULL

            self._npy_array.data = <char *>self.data
                           ^
------------------------------------------------------------

cyarray\carray.pyx:2927:27: Assignment to a read-only property

Error compiling Cython file:
------------------------------------------------------------
...

            self.data = self._old_data

            self._old_data = NULL

            self._npy_array.data = <char *>self.data
                           ^
------------------------------------------------------------

cyarray\carray.pyx:3937:27: Assignment to a read-only property

Error compiling Cython file:
------------------------------------------------------------
...

            self.data = self._old_data

            self._old_data = NULL

            self._npy_array.data = <char *>self.data
                           ^
------------------------------------------------------------

cyarray\carray.pyx:4947:27: Assignment to a read-only property
Traceback (most recent call last):
  File "D:\OSS\cyarray\setup.py", line 160, in <module>
    setup_package()
  File "D:\OSS\cyarray\setup.py", line 105, in setup_package
    ext_modules = cythonize(
  File "C:\Users\prajw\miniconda3\envs\sph39\lib\site-packages\Cython\Build\Dependencies.py", line 1134, in cythonize
    cythonize_one(*args)
  File "C:\Users\prajw\miniconda3\envs\sph39\lib\site-packages\Cython\Build\Dependencies.py", line 1301, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: cyarray/carray.pyx

OS & C++ versions

OS Name:                   Microsoft Windows 11 Home Single Language
OS Version:                10.0.22621 N/A Build 22621
System Type:               x64-based PC
Microsoft Visual C++ 2015-2022 Redistributable (x64) - 14.36.32532

Python environment

conda 23.3.1
Python 3.9.17
colorama          0.4.6
compyle           0.9.dev0 d:\oss\compyle
Cython            3.0.0
exceptiongroup    1.1.2
iniconfig         2.0.0
Mako              1.2.4
MarkupSafe        2.1.3
numpy             1.25.1
packaging         23.1
pip               23.1.2
platformdirs      3.9.1
pluggy            1.2.0
pytest            7.4.0
pytools           2023.1
setuptools        67.8.0
tomli             2.0.1
typing_extensions 4.7.1
wheel             0.38.4

import error

I tried to import cyarray with:
"from cyarray.api import IntArray"
and got:
"SystemError: execution of module cyarray.carray raised unreported exception"
it seems that "from .carray import IntArray, UIntArray, LongArray, FloatArray, DoubleArray" in cyarray.api failed
how to solve

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.