8000 Auto-generated commit · stdlib-js/ndarray-base-assert@03ffd6e · GitHub
[go: up one dir, main page]

Skip to content

Commit 03ffd6e

Browse files
committed
Auto-generated commit
1 parent e658492 commit 03ffd6e

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
<section class="release" id="unreleased">
66

7-
## Unreleased (2025-03-23)
7+
## Unreleased (2025-03-24)
88

99
<section class="packages">
1010

@@ -20,6 +20,7 @@
2020

2121
##### Features
2222

23+
- [`d8f2acf`](https://github.com/stdlib-js/stdlib/commit/d8f2acf4d31d3da271e7d2074ffb40a6317c4a23) - update namespace TypeScript declarations [(#6337)](https://github.com/stdlib-js/stdlib/pull/6337)
2324
- [`1a18317`](https://github.com/stdlib-js/stdlib/commit/1a183174f05d99bf78be477639df489493c01e2b) - add `isScalarMostlySafeCompatible` to namespace
2425
- [`2f0aa48`](https://github.com/stdlib-js/stdlib/commit/2f0aa48ef6d561779d4bd4c4a54fe00a5a26c0e1) - update namespace TypeScript declarations [(#5436)](https://github.com/stdlib-js/stdlib/pull/5436)
2526
- [`c1b6794`](https://github.com/stdlib-js/stdlib/commit/c1b6794e36255d7df6795f5f5f4d3e493165f397) - add `isOutputDataTypePolicy` to namespace
@@ -205,6 +206,7 @@ A total of 2 people contributed to this release. Thank you to the following cont
205206

206207
<details>
207208

209+
- [`d8f2acf`](https://github.com/stdlib-js/stdlib/commit/d8f2acf4d31d3da271e7d2074ffb40a6317c4a23) - **feat:** update namespace TypeScript declarations [(#6337)](https://github.com/stdlib-js/stdlib/pull/6337) _(by stdlib-bot)_
208210
- [`1a18317`](https://github.com/stdlib-js/stdlib/commit/1a183174f05d99bf78be477639df489493c01e2b) - **feat:** add `isScalarMostlySafeCompatible` to namespace _(by Athan Reines)_
209211
- [`6003449`](https://github.com/stdlib-js/stdlib/commit/600344933e2836421aa15fb89d62e9a0a9266bd6) - **feat:** add `ndarray/base/assert/is-scalar-mostly-safe-compatible` _(by Athan Reines)_
210212
- [`2f0aa48`](https://github.com/stdlib-js/stdlib/commit/2f0aa48ef6d561779d4bd4c4a54fe00a5a26c0e1) - **feat:** update namespace TypeScript declarations [(#5436)](https://github.com/stdlib-js/stdlib/pull/5436) _(by stdlib-bot)_

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Justyn Shelby <96994781+ShelbyJustyn@users.noreply.github.com>
7878
Karan Anand <119553199+anandkaranubc@users.noreply.github.com>
7979
Karthik Prakash <116057817+skoriop@users.noreply.github.com>
8080
Kaushikgtm <162317291+Kaushikgtm@users.noreply.github.com>
81+
Kavyansh-Bagdi <153486713+Kavyansh-Bagdi@users.noreply.github.com>
8182
Kohantika Nath <145763549+kohantikanath@users.noreply.github.com>
8283
Krishnam Agarwal <83017176+888krishnam@users.noreply.github.com>
8384
Krishnendu Das <86651039+itskdhere@users.noreply.github.com>

docs/types/index.d.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import isRowMajorContiguous = require( '@stdlib/ndarray-base-assert-is-row-major
4747
import isRowMajorString = require( '@stdlib/ndarray-base-assert-is-row-major-string' );
4848
import isSafeDataTypeCast = require( '@stdlib/ndarray-base-assert-is-safe-data-type-cast' );
4949
import isSameKindDataTypeCast = require( '@stdlib/ndarray-base-assert-is-same-kind-data-type-cast' );
50+
import isScalarMostlySafeCompatible = require( '@stdlib/ndarray-base-assert-is-scalar-mostly-safe-compatible' );
5051
import isSignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-signed-integer-data-type' );
5152
import isSingleSegmentCompatible = require( '@stdlib/ndarray-base-assert-is-single-segment-compatible' );
5253
import isUnsignedIntegerDataType = require( '@stdlib/ndarray-base-assert-is-unsigned-integer-data-type' );
@@ -839,6 +840,27 @@ interface Namespace {
839840
*/
840841
isSameKindDataTypeCast: typeof isSameKindDataTypeCast;
841842

843+
/**
844+
* Returns a boolean indicating whether a scalar value can be safely cast or, for floating-point data types, downcast to specified ndarray data type.
845+
*
846+
* @param value - scalar value
847+
* @param dtype - ndarray data type
848+
* @returns boolean indicating whether a scalar value can be safely cast
849+
*
850+
* @example
851+
* var bool = ns.isScalarMostlySafeCompatible( 3.0, 'float64' );
852+
* // returns true
853+
*
854+
* @example
855+
* var bool = ns.isScalarMostlySafeCompatible( 3.14, 'int32' );
856+
* // returns false
857+
*
858+
* @example
859+
* var bool = ns.isScalarMostlySafeCompatible( -1, 'uint32' );
860+
* // returns false
861+
*/
862+
isScalarMostlySafeCompatible: typeof isScalarMostlySafeCompatible;
863+
842864
/**
843865
* Tests whether an input value is a supported ndarray signed integer data type.
844866
*

0 commit comments

Comments
 (0)
0