Skip to content

data-type specific Julia scalars with JuliaCall #504

Closed
@mtsokol

Description

@mtsokol

Affects: JuliaCall

Describe the bug

I would like to create Julia scalars by calling appropriate data-types (Int8, Int16, etc.), but instead calling specific dtypes just give python builtins (e.g. int for any integer julia dtype). Or is there another way to instantiate them?

from juliacall import Main as jl
import numpy as np

a1 = jl.Int8(0)
type(a1)  # it's just int

a2 = np.int8(0)
type(a2)  # it's numpy.int8

Your system
Please provide detailed information about your system:

In [80]: juliacall.__version__
Out[80]: '0.9.19'
JuliaPkg Status
/Users/.../Library/Caches/pypoetry/virtualenvs/finch-tensor-iqiMydcW-py3.10/julia_env/pyjuliapkg/juliapkg.json
Julia 1.10.0 @ /Users/.../.julia/juliaup/julia-1.10.0+0.x64.apple.darwin14/bin/julia
Packages:
  Finch: {'uuid': '9177782c-1635-4eb9-9bfb-d9dfa25e6bce', 'version': '0.6.30'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions