Skip to content

Commit 3d09030

Browse files
committed
docs: document exported data type instances
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed ---
1 parent 6f68eff commit 3d09030

File tree

4 files changed

+408
-16
lines changed

4 files changed

+408
-16
lines changed

lib/node_modules/@stdlib/ndarray/dtypes/README.md

Lines changed: 154 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ var dtypes = require( '@stdlib/ndarray/dtypes' );
4242

4343
#### dtypes( \[kind] )
4444

45-
Returns a list of ndarray data types.
45+
Returns a list of ndarray data type strings.
4646

4747
```javascript
4848
var out = dtypes();
4949
// e.g., returns [ 'binary', 'complex32', 'complex64', 'complex128', ... ]
5050
```
5151

52-
When not provided a data type "kind", the function returns an array containing the following data types:
52+
When not provided a data type "kind", the function returns an array containing the following data type strings:
5353

5454
- `binary`: binary.
5555
- `bool`: boolean values.
@@ -60,15 +60,15 @@ When not provided a data type "kind", the function returns an array containing t
6060
- `float32`: single-precision floating-point numbers.
6161
- `float64`: double-precision floating-point numbers.
6262
- `generic`: values of any type.
63+
- `int8`: signed 8-bit integers.
6364
- `int16`: signed 16-bit integers.
6465
- `int32`: signed 32-bit integers.
65-
- `int8`: signed 8-bit integers.
66-
- `uint16`: unsigned 16-bit integers.
67-
- `uint32`: unsigned 32-bit integers.
6866
- `uint8`: unsigned 8-bit integers.
6967
- `uint8c`: unsigned clamped 8-bit integers.
68+
- `uint16`: unsigned 16-bit integers.
69+
- `uint32`: unsigned 32-bit integers.
7070

71-
To return the subset of data types belonging to a specified data type kind, provide a `kind` argument.
71+
To return the subset of data type strings belonging to a specified data type kind, provide a `kind` argument.
7272

7373
```javascript
7474
var out = dtypes( 'floating_point' );
@@ -101,6 +101,152 @@ var out = dtypes( 'floating_point_and_generic' );
101101
// returns [...]
102102
```
103103

104+
<!-- NOTE: keep the following in alphabetical order -->
105+
106+
#### dtypes.binary
107+
108+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a binary data type.
109+
110+
```javascript
111+
var dt = dtypes.binary;
112+
// returns <DataType>
113+
```
114+
115+
#### dtypes.bool
116+
117+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a boolean data type.
118+
119+
```javascript
120+
var dt = dtypes.bool;
121+
// returns <DataType>
122+
```
123+
124+
#### dtypes.complex32
125+
126+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a half-precision complex floating-point number data type.
127+
128+
```javascript
129+
var dt = dtypes.complex32;
130+
// returns <DataType>
131+
```
132+
133+
#### dtypes.complex64
134+
135+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a single-precision complex floating-point number data type.
136+
137+
```javascript
138+
var dt = dtypes.complex64;
139+
// returns <DataType>
140+
```
141+
142+
#### dtypes.complex128
143+
144+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a double-precision complex floating-point number data type.
145+
146+
```javascript
147+
var dt = dtypes.complex128;
148+
// returns <DataType>
149+
```
150+
151+
#### dtypes.float16
152+
153+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a half-precision real-valued floating-point number data type.
154+
155+
```javascript
156+
var dt = dtypes.float16;
157+
// returns <DataType>
158+
```
159+
160+
#### dtypes.float32
161+
162+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a single-precision real-valued floating-point number data type.
163+
164+
```javascript
165+
var dt = dtypes.float32;
166+
// returns <DataType>
167+
```
168+
169+
#### dtypes.float64
170+
171+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a double-precision real-valued floating-point number data type.
172+
173+
```javascript
174+
var dt = dtypes.float64;
175+
// returns <DataType>
176+
```
177+
178+
#### dtypes.generic
179+
180+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a "generic" data type.
181+
182+
```javascript
183+
var dt = dtypes.generic;
184+
// returns <DataType>
185+
```
186+
187+
#### dtypes.int8
188+
189+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a signed 8-bit integer data type.
190+
191+
```javascript
192+
var dt = dtypes.int8;
193+
// returns <DataType>
194+
```
195+
196+
#### dtypes.int16
197+
198+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a signed 16-bit integer data type.
199+
200+
```javascript
201+
var dt = dtypes.int16;
202+
// returns <DataType>
203+
```
204+
205+
#### dtypes.int32
206+
207+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing a signed 32-bit integer data type.
208+
209+
```javascript
210+
var dt = dtypes.int32;
211+
// returns <DataType>
212+
```
213+
214+
#### dtypes.uint8
215+
216+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing an unsigned 8-bit integer data type.
217+
218+
```javascript
219+
var dt = dtypes.uint8;
220+
// returns <DataType>
221+
```
222+
223+
#### dtypes.uint8c
224+
225+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing an unsigned clamped 8-bit integer data type.
226+
227+
```javascript
228+
var dt = dtypes.uint8c;
229+
// returns <DataType>
230+
```
231+
232+
#### dtypes.uint16
233+
234+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing an unsigned 16-bit integer data type.
235+
236+
```javascript
237+
var dt = dtypes.uint16;
238+
// returns <DataType>
239+
```
240+
241+
#### dtypes.uint32
242+
243+
**Read-only** property returning a [data type][@stdlib/ndarray/dtype-ctor] instance representing an unsigned 32-bit integer data type.
244+
245+
```javascript
246+
var dt = dtypes.uint32;
247+
// returns <DataType>
248+
```
249+
104250
</section>
105251

106252
<!-- /.usage -->
@@ -173,6 +319,8 @@ bool = isdtype( 'beep' );
173319

174320
<section class="links">
175321

322+
[@stdlib/ndarray/dtype-ctor]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/ndarray/dtype-ctor
323+
176324
<!-- <related-links> -->
177325

178326
[@stdlib/array/dtypes]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/dtypes

0 commit comments

Comments
 (0)