Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Oct 14, 2023
1 parent 57d02d8 commit 092b2e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ The function accepts the following `options`:
- `none`: only allow casting between identical types.
- `equiv`: allow casting between identical and byte swapped types.
- `safe`: only allow "safe" casts.
- `mostly-safe`: allow "safe" casts and, for floating-point data types, downcasts.
- `same-kind`: allow "safe" casts and casts within the same kind (e.g., between signed integers or between floats).
- `unsafe`: allow casting between all types (including between integers and floats).

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

// Serialize the array as JSON:
str = JSON.stringify( arr.toJSON() );
// 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]}'
// 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]}'
```

</section>
Expand Down
2 changes: 2 additions & 0 deletions docs/repl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
- 'none': only allow casting between identical types.
- 'equiv': allow casting between identical and byte swapped types.
- 'safe': only allow "safe" casts.
- 'mostly-safe': allow "safe casts" and, for floating-point data types,
downcasts.
- 'same-kind': allow "safe" casts and casts within the same kind (e.g.,
between signed integers or between floats).
- 'unsafe': allow casting between all types (including between integers
Expand Down

0 comments on commit 092b2e9

Please sign in to comment.