Skip to content

Commit 092b2e9

Browse files
committed
Auto-generated commit
1 parent 57d02d8 commit 092b2e9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ The function accepts the following `options`:
136136
- `none`: only allow casting between identical types.
137137
- `equiv`: allow casting between identical and byte swapped types.
138138
- `safe`: only allow "safe" casts.
139+
- `mostly-safe`: allow "safe" casts and, for floating-point data types, downcasts.
139140
- `same-kind`: allow "safe" casts and casts within the same kind (e.g., between signed integers or between floats).
140141
- `unsafe`: allow casting between all types (including between integers and floats).
141142

@@ -261,7 +262,7 @@ var str = arr.toString();
261262

262263
// Serialize the array as JSON:
263264
str = JSON.stringify( arr.toJSON() );
264-
// returns '{"type":"ndarray","dtype":"float32","flags":{},"order":"row-major","shape":[3,3,3,3],"strides":[27,9,3,1],"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}'
265+
// e.g., returns '{"type":"ndarray","dtype":"float32","flags":{},"order":"row-major","shape":[3,3,3,3],"strides":[27,9,3,1],"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}'
265266
```
266267

267268
</section>

docs/repl.txt

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@
8181
- 'none': only allow casting between identical types.
8282
- 'equiv': allow casting between identical and byte swapped types.
8383
- 'safe': only allow "safe" casts.
84+
- 'mostly-safe': allow "safe casts" and, for floating-point data types,
85+
downcasts.
8486
- 'same-kind': allow "safe" casts and casts within the same kind (e.g.,
8587
between signed integers or between floats).
8688
- 'unsafe': allow casting between all types (including between integers

0 commit comments

Comments
 (0)