JuliaPy / JuliaPy/PythonCall.jl
Support more of abstract array interface
Đang mở
enhancement
- Ngôn ngữ chính
- Julia
- Star
- 1.1k
- Fork
- 86
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
Currently `similar` will return an array of a different type:
```python
from juliacall import Main as jl
import numpy as np
x = np.random.randn(5)
y = jl.similar(x)
print(jl.typeof(x))
# PyArray{Float64, 1, true, true, Float64}
print(jl.typeof(y))
# Vector{Float64}
```
This can introduce some type instabilities in libraries due to the assumption that container type is preserved by `similar`.
I guess we just need the "optional methods" from here: https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-array
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.