Building a 2D ndarray from rows or columns

Ouverte
#539 18 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
rust
Domaine
data

Piste de recherche

Start by reviewing ndarray's existing stack functionality and the proposed from_rows and from_columns iterator APIs in this issue. Resolve whether collecting rows or columns and using stack is sufficient; done means the design is decided and, if new functionality is warranted, both construction paths have appropriate coverage.

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

Description

enhancement

A couple different times I have wanted to construct a 2D array from an iterator of 1D arrays. Is this something that should be added to ndarray?

Roughly, I'm thinking of a function from_rows<I: Iterator<Item=Array1>>(rows: I) -> Array2 and an analogous from_columns.

One design question that I'm not currently sure about is whether the user should have to specify any information about the dimensions. I am leaning towards "no," especially because it may be difficult to know the size of an iterator beforehand.

Possibly, it would make more sense to collect my iterator and use stack rather than adding new functionality. However, if this sounds useful, I would be happy to take a whack at implementing it.

Langage dominant
Rust
Étoiles
4.3k
Forks
391
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

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

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de rust-ndarray/ndarray

Toutes les issues de rust-ndarray/ndarray

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

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