JuliaPy / JuliaPy/PyCall.jl

Numpy arrays of `str` dtype are not converted to Arrays

Offen
#901 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
1.5k
Forks
186
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

A `np.array` with `dtype=str`, when passed to Julia remains a `PyObject`, instead of becoming some useful `Array{String}`. Here's a minimal example:

```julia
julia> using PyCall

julia> py"""
import numpy as np
"""

julia> py"""np.array(["a"], dtype=str)"""
PyObject array(['a'], dtype='

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start by reproducing the minimal Julia/Python example with a NumPy array using dtype=str, then inspect PyCall's NumPy array conversion path. Done means the value is converted to a Julia Array{String} rather than remaining a PyObject.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
numpy, python
Bereich
data
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.