You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: add boolean dtype support to array/min-dtype
This commit changes the return value when provided a boolean primitive. Previously, the function returned "generic", and now the function returns "bool".
BREAKING CHANGE: return "bool" when provided a boolean
To migrate, users explicitly handle "bool" return values. If "generic" is still desired, users should consolidate accordingly.
PR-URL: #2556
Ref: #2304
Co-authored-by: Athan Reines <[email protected]>
Reviewed-by: Athan Reines <[email protected]>
Signed-off-by: Athan Reines <[email protected]>
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/array/min-dtype/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ dt = minDataType( '3' );
68
68
69
69
## Notes
70
70
71
-
- The function does **not** provide precision guarantees for non-integer-valued real numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) [data type][@stdlib/array/dtypes] for storing numbers having decimals.
71
+
- The function does **not** provide precision guarantees for non-integer-valued numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) [data type][@stdlib/array/dtypes] for storing numbers having decimals.
* Returns the minimum array data type of the closest "kind" necessary for storing a provided scalar value.
28
28
*
29
29
* ## Notes
30
30
*
31
-
* - The function does *not* provide precision guarantees for non-integer-valued real numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) data type for storing numbers having decimals.
31
+
* - The function does *not* provide precision guarantees for non-integer-valued numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) data type for storing numbers having decimals.
32
32
*
33
33
* @param value - scalar value
34
34
* @returns array data type
@@ -48,7 +48,7 @@ declare function minDataType( value: number ): RealDataType;
48
48
*
49
49
* ## Notes
50
50
*
51
-
* - The function does *not* provide precision guarantees for non-integer-valued real numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) data type for storing numbers having decimals.
51
+
* - The function does *not* provide precision guarantees for non-integer-valued numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) data type for storing numbers having decimals.
52
52
*
53
53
* @param value - scalar value
54
54
* @returns array data type
@@ -63,12 +63,24 @@ declare function minDataType( value: number ): RealDataType;
* Returns the minimum array data type of the closest "kind" necessary for storing a provided scalar value.
68
80
*
69
81
* ## Notes
70
82
*
71
-
* - The function does *not* provide precision guarantees for non-integer-valued real numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) data type for storing numbers having decimals.
83
+
* - The function does *not* provide precision guarantees for non-integer-valued numbers. In other words, the function returns the smallest possible floating-point (i.e., inexact) data type for storing numbers having decimals.
0 commit comments