Comments (5)
Hi thanks for the report.
I'm actually rewriting this package from scratch, so won't be fixing bugs in the current release. The new version is on branch 'rewrite'. Not documented yet but very similar API to old version.
I believe this particular bug is not present in the new version. Please try it out and let me know.
from pythoncall.jl.
Yes, works in 1.8, and beta2. I didn't test further, for now:
julia> @time using PythonCall # 1.6
3.005584 seconds (2.36 M allocations: 139.871 MiB, 1.84% gc time)
julia> @time using PythonCall # 1.7
3.966541 seconds (2.46 M allocations: 153.414 MiB, 1.56% gc time, 0.17% compilation time)
julia> @time using PythonCall # 1.8
3.786829 seconds (2.34 M allocations: 146.184 MiB, 0.99% gc time, 0.32% compilation time)
I'm not sure why 1.6 is fastest, possibly related to allocations, while seems not the whole story.
$ ~/julia-1.8-DEV-d1145d4569/bin/julia -O1
julia> @time using PythonCall
2.681354 seconds (2.34 M allocations: 146.187 MiB, 1.46% gc time, 0.19% compilation time)
$ ~/julia-1.8-DEV-d1145d4569/bin/julia -O0 --compile=min
julia> @time using PythonCall
0.692783 seconds (465.87 k allocations: 35.170 MiB, 1.85% gc time)
You can close the issue on my account, or keep it open a little longer so people may see it after 1.7 release in case you've not made the rewrite official.
The last timing is comparable to PyCall.jl, with or without NumPyArrays.jl from @mkitti.
from pythoncall.jl.
Thanks, those are interesting timings. I'll look into making startup quicker once the package is more complete. It will probably always be slower than PyCall to start simply because this is a bigger package.
from pythoncall.jl.
After writing NumPyArrays.jl, it occurred to me that PyCall.jl might actually be too big. Why should a Py[thon]Call support NumPy arrays at all? NumPy is not the only n-dimensional array package for Python. xarray
comes to mind.
My suggestion is to consider breaking up the package into smaller modular packages. Maybe PythonCall is the the package that depends on multiple smaller packages, with a core package called PythonCallCore or PythonCallBase.
An example of this is https://github.com/JuliaDiff/ChainRulesCore.jl and https://github.com/JuliaDiff/ChainRules.jl
from pythoncall.jl.
In fact PythonCall does not directly support numpy. Instead it supports the buffer protocol and the array interface, which a broad class of array types support (bytes, ndarray, pandas, xarray, ...)
from pythoncall.jl.
Related Issues (20)
- `pyconvert_add_rule` must be executed before using `pyimport` in `__init__()` HOT 1
- Pandas compatibility HOT 6
- np.bool_ does not convert to julia Bool HOT 4
- data-type specific Julia scalars with JuliaCall HOT 2
- capture / silence julia initialization in stdout HOT 2
- OSError on Apple M2 Chip HOT 2
- the new Numpy v2.0.0 break the package HOT 1
- PythonCall.jl 0.9.19 and 0.9.20 seem broken on julia-nightly on GH actions HOT 6
- finalizer may never be called HOT 2
- Is there a systematic way to check whether julia code is called via JuliaCall versus normal Julia? HOT 4
- Segfault on M3 when loading specific Python subpackage HOT 1
- Libraries loaded via _jll packages are visible inside PythonCall environment. HOT 3
- RFC: Syntax for Gradual Julia-ization of a Python library HOT 1
- seg fault from pynew() in vs code REPL HOT 5
- Using `pyproject.toml` to configure Julia dependencies
- Ctrl-C interrupts not working inside python execution HOT 2
- [BUG] Hard crash due to Mac System Integrity Protection (SIP) Security Protocol Activation HOT 3
- rr chaos mode for stress testing garbage collection
- Inconsistency implicit type conversion
- juliacall 0.9.22 can result in hanging precompilation HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pythoncall.jl.