JuliaPy / JuliaPy/PyCall.jl

gmpy2 support

Ouverte
#104 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Julia
Étoiles
1.5k
Forks
186
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Currently, PyCall uses strings as the interchange mechanism for `BigFloat` and `BigInt`. This is suboptimal from a performance perspective and also potentially lossy in the case of `BigFloat`.

However, the `gmpy2` module for Python provides a Python interface to GNU MP/MPFR numbers (the same as Julia), and it should be possible (with suitable digging) to pass Julia bignums to Python in binary form (and potentially without making a copy). (Furthermore, when the `gmpy2` module is available in Python, the `mpmath` module automatically uses it anyway, so we might as well take advantage of it for `BigFloat` conversions if it is present.)

I'm not sure if anyone actually cares about better bignum interoperability with Python, though?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Aucun fichier, test ou point d’entrée n’est nommé. Étudiez les chemins existants de conversion en chaîne de PyCall pour BigFloat et BigInt, puis déterminez si gmpy2 peut fournir une interopérabilité binaire ou zero-copy sans perte ; le travail est terminé lorsque les conversions prises en charge sont implémentées et couvertes par les tests pertinents.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
julia, python
Domaine
backend-api-design, tooling
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
20/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.