pypr / cyarray Goto Github PK
View Code? Open in Web Editor NEWA fast, typed, resizable, Cython array.
License: Other
A fast, typed, resizable, Cython array.
License: Other
Facing a local build (and pip install) error with cyarray
.
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
fileAssignment to a read-only property
. Fix: To be identified.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 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
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.