[RFC]: add `ndarray/tensor3d/ctor`
Los mantenedores suelen responder en 1 día
@0PrashantYadav0 ya está trabajando en esto.
Desde el 4/9/2026.
- #14960 de @0PrashantYadav0 — abierto
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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:.
- Lenguaje dominante
- JavaScript
- Estrellas
- 6k
- Forks
- 1.3k
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 568
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stdlib-js/stdlib
-
Fix JavaScript lint errorsPosiblemente ocupada @lb1192176991-lab la tomó hace 3 días. AbiertoGood First Issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
stdlib-js/stdlib#15831 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
`@stdlib/string/base/percent-encode` produces malformed encoding and silently drops charactersPosiblemente ocupada @barbierajput378-pixel la tomó hace 8 días. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
stdlib-js/stdlib#15595 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug]: kumaraswamy/kurtosis returns non-excess kurtosis (missing −3)Posiblemente ocupada @Planeshifter la tomó hace 8 días. AbiertoBug Statistics
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stdlib-js/stdlib#15461 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[Bug]: rayleigh/mgf returns wrong values due to misplaced parenthesisPosiblemente ocupada @anandkaranubc la tomó hace 11 días. AbiertoBug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stdlib-js/stdlib#15456 · 6 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
@stdlib/array/fixed-endian-factory allows misaligned byte offsets and fractional lengthsPosiblemente ocupada @kanikasharma-18 la tomó hace 23 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
stdlib-js/stdlib#15193 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de stdlib-js/stdlib
Issues similares
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 85/100
capricorn86/happy-dom#2474 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
juice-shop/juice-shop#3662 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Add unit-test coverage for API URL resolution and device authentication error handlingPosiblemente ocupada @Simranjit8933 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
fossasia/eventyay-checkin#170 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día