Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 092b2e9

Browse filesBrowse files
committed
Auto-generated commit
1 parent 57d02d8 commit 092b2e9
Copy full SHA for 092b2e9

File tree

2 files changed

+4
-1
lines changed
Filter options

2 files changed

+4
-1
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
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

Copy file name to clipboardExpand all lines: docs/repl.txt
+2Lines changed: 2 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.