[RFC]: add `ndarray/tensor3d/ctor`
I maintainer di solito rispondono entro 1 giorno
@0PrashantYadav0 ci sta già lavorando.
Dal 4/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Description
This RFC proposes adding @stdlib/ndarray/tensor3d/ctor, the three-dimensional counterpart to the existing @stdlib/ndarray/vector/ctor and @stdlib/ndarray/matrix/ctor packages, as the next step toward providing dedicated dimensional constructors up to five dimensions.
Motivation
As with ndarray/vector/* and ndarray/matrix/*, these APIs provide convenient dedicated interfaces for constructing arrays of a known dimensionality from nested arrays, together with the corresponding validation. For example,
var x = new Float64Tensor3D( [ [ [ 1, 2, 3 ], [ 4, 5, 6 ] ], [ [ 7, 8, 9 ], [ 10, 11, 12 ] ] ] );
// returns <ndarray>
Dimensional constructors up to 5D cover more than 80% of end-user use cases for ndarray dimensionality. Arrays of six or more dimensions are markedly less common and are adequately served by the general-purpose @stdlib/ndarray/ctor and @stdlib/ndarray/array APIs.
Supported options (readonly, mode, submode, order) and their defaults are unchanged from matrix/ctor.
Future plan
This RFC covers tensor3d/ctor and the typed constructors. The sequence:
- The parent
@stdlib/ndarray/tensor3dnamespace package — handled separately by a maintainer. Not done here. - Typed 3D constructors — done. The complete set matching
vector:bool(BooleanTensor3D),complex64,complex128,float32,float64,int8,int16,int32,uint8,uint8c(Uint8ClampedTensor3D),uint16,uint32. Each is a thin wrapper overrequire( '@stdlib/ndarray/tensor3d/ctor' ).factory( dtype )accompanied by documentation, types, tests, and benchmarks. ndarray/tensor4d— constructor plus typed packages, using@stdlib/array/base/flatten4d.ndarray/tensor5d— constructor plus typed packages, using@stdlib/array/base/flatten5d, completing coverage through five dimensions.
Constructor names follow the vector convention rather than a literal data type transliteration: bool exports BooleanTensor3D and uint8c exports Uint8ClampedTensor3D. Package descriptions use the repository's dominant phrasing for integer types ("signed 32-bit integer", used by 39 packages) rather than the inverted form used by matrix/int32 and two others.
Related Issues
None.
Questions
No.
Three questions were raised while drafting and have since been resolved by a maintainer:
- Should the thin parent
@stdlib/ndarray/tensor3dnamespace package land together withtensor3d/ctor? — No. It will be handled separately by a maintainer. - Should the typed constructors mirror the
matrixset or the broadervectorset? — The full set, matchingvector. Work is already in progress to bring thematrixnamespace up to the complete set. - Should the
from_arraybuffer.jsTODObe tackled as part of this work? — No. Work on@stdlib/ndarray/from-arraybufferis already in progress separately; copying the helper is acceptable for now.
Other
No.
Checklist
- I have read and understood the Code of Conduct.
- Searched for existing issues and pull requests.
- The issue name begins with
RFC:.
- Lingua principale
- JavaScript
- Stelle
- 6k
- Fork
- 1.3k
- Merge medio
- 1g 8h
- PR unite (30g)
- 602
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stdlib-js/stdlib
-
Fix JavaScript lint errorsApertaGood First Issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
stdlib-js/stdlib#15831 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
`@stdlib/string/base/percent-encode` produces malformed encoding and silently drops charactersApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
stdlib-js/stdlib#15595 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: kumaraswamy/kurtosis returns non-excess kurtosis (missing −3)Forse già presa @Planeshifter l’ha presa 5 giorni fa. ApertaBug Statistics
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stdlib-js/stdlib#15461 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: rayleigh/mgf returns wrong values due to misplaced parenthesisForse già presa @anandkaranubc l’ha presa 7 giorni fa. ApertaBug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stdlib-js/stdlib#15456 · 6 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
stdlib-js/stdlib#15193 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stdlib-js/stdlib
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CircuitVerse/CircuitVerse#7967 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CopilotKit/aimock#491 ·
I maintainer di solito rispondono entro 1 giorno
-
cvss-severity:high devguard l3montree-cybersecurity/.../devguard-documentation pkg:devguard/l3montree-c.../devguard-documentation risk:low state:open
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
l3montree-dev/devguard-documentation#338 · 1 commento ·
-
bug runtime spec compliance
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
frostney/GocciaScript#1413 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
keyxmakerx/Chronicle#967 ·
I maintainer di solito rispondono entro 1 giorno