From dc473d1b178499c64ad4f0404222249095e46cea Mon Sep 17 00:00:00 2001 From: Jaysukh-409 Date: Mon, 10 Jun 2024 21:41:32 +0530 Subject: [PATCH 1/2] feat: add boolean datatype support in array/safe-casts --- .../array/safe-casts/lib/safe_casts.json | 123 +++++++++++------- 1 file changed, 75 insertions(+), 48 deletions(-) diff --git a/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json b/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json index 86f47f0a9224..47f457f1b2ab 100644 --- a/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json +++ b/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json @@ -9,8 +9,9 @@ "uint16": 0, "uint8": 0, "uint8c": 0, - "complex128": 1, - "complex64": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, "generic": 1 }, "float32": { @@ -23,8 +24,9 @@ "uint16": 0, "uint8": 0, "uint8c": 0, - "complex128": 1, - "complex64": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, "generic": 1 }, "int32": { @@ -37,8 +39,9 @@ "uint16": 0, "uint8": 0, "uint8c": 0, - "complex128": 1, - "complex64": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, "generic": 1 }, "int16": { @@ -51,8 +54,9 @@ "uint16": 0, "uint8": 0, "uint8c": 0, - "complex128": 1, - "complex64": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, "generic": 1 }, "int8": { @@ -65,8 +69,9 @@ "uint16": 0, "uint8": 0, "uint8c": 0, - "complex128": 1, - "complex64": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, "generic": 1 }, "uint32": { @@ -79,8 +84,9 @@ "uint16": 0, "uint8": 0, "uint8c": 0, - "complex128": 1, - "complex64": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, "generic": 1 }, "uint16": { @@ -93,8 +99,9 @@ "uint16": 1, "uint8": 0, "uint8c": 0, - "complex128": 1, - "complex64": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, "generic": 1 }, "uint8": { @@ -107,8 +114,9 @@ "uint16": 1, "uint8": 1, "uint8c": 1, - "complex128": 1, - "complex64": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, "generic": 1 }, "uint8c": { @@ -121,38 +129,56 @@ "uint16": 1, "uint8": 1, "uint8c": 1, - "complex128": 1, - "complex64": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "complex128": { + "float64": 0, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, + "generic": 1 + }, + "complex64": { + "float64": 0, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "bool": { + "float64": 0, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 0, + "complex64": 0, + "bool": 1, "generic": 1 }, - "complex128": { - "float64": 0, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 0, - "generic": 1 - }, - "complex64": { - "float64": 0, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 1, - "generic": 1 - }, "generic": { "float64": 0, "float32": 0, @@ -163,8 +189,9 @@ "uint16": 0, "uint8": 0, "uint8c": 0, - "complex128": 0, - "complex64": 0, + "complex128": 0, + "complex64": 0, + "bool": 0, "generic": 1 } } From cd5f7dd7a154878518077166dc10c41e95b6c98b Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 10 Jun 2024 15:55:08 -0400 Subject: [PATCH 2/2] style: fix indentation --- .../array/safe-casts/lib/safe_casts.json | 390 +++++++++--------- 1 file changed, 195 insertions(+), 195 deletions(-) diff --git a/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json b/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json index 47f457f1b2ab..43e6b95b697d 100644 --- a/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json +++ b/lib/node_modules/@stdlib/array/safe-casts/lib/safe_casts.json @@ -1,197 +1,197 @@ { - "float64": { - "float64": 1, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 0, - "bool": 0, - "generic": 1 - }, - "float32": { - "float64": 1, - "float32": 1, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 1, - "bool": 0, - "generic": 1 - }, - "int32": { - "float64": 1, - "float32": 0, - "int32": 1, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 0, - "bool": 0, - "generic": 1 - }, - "int16": { - "float64": 1, - "float32": 1, - "int32": 1, - "int16": 1, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 1, - "bool": 0, - "generic": 1 - }, - "int8": { - "float64": 1, - "float32": 1, - "int32": 1, - "int16": 1, - "int8": 1, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 1, - "bool": 0, - "generic": 1 - }, - "uint32": { - "float64": 1, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 1, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 0, - "bool": 0, - "generic": 1 - }, - "uint16": { - "float64": 1, - "float32": 1, - "int32": 1, - "int16": 0, - "int8": 0, - "uint32": 1, - "uint16": 1, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 1, - "bool": 0, - "generic": 1 - }, - "uint8": { - "float64": 1, - "float32": 1, - "int32": 1, - "int16": 1, - "int8": 0, - "uint32": 1, - "uint16": 1, - "uint8": 1, - "uint8c": 1, - "complex128": 1, - "complex64": 1, - "bool": 0, - "generic": 1 - }, - "uint8c": { - "float64": 1, - "float32": 1, - "int32": 1, - "int16": 1, - "int8": 0, - "uint32": 1, - "uint16": 1, - "uint8": 1, - "uint8c": 1, - "complex128": 1, - "complex64": 1, - "bool": 0, - "generic": 1 - }, - "complex128": { - "float64": 0, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 0, - "bool": 0, - "generic": 1 - }, - "complex64": { - "float64": 0, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 1, - "complex64": 1, - "bool": 0, - "generic": 1 - }, - "bool": { - "float64": 0, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 0, - "complex64": 0, - "bool": 1, - "generic": 1 - }, - "generic": { - "float64": 0, - "float32": 0, - "int32": 0, - "int16": 0, - "int8": 0, - "uint32": 0, - "uint16": 0, - "uint8": 0, - "uint8c": 0, - "complex128": 0, - "complex64": 0, - "bool": 0, - "generic": 1 - } + "float64": { + "float64": 1, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, + "generic": 1 + }, + "float32": { + "float64": 1, + "float32": 1, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "int32": { + "float64": 1, + "float32": 0, + "int32": 1, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, + "generic": 1 + }, + "int16": { + "float64": 1, + "float32": 1, + "int32": 1, + "int16": 1, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "int8": { + "float64": 1, + "float32": 1, + "int32": 1, + "int16": 1, + "int8": 1, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "uint32": { + "float64": 1, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 1, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, + "generic": 1 + }, + "uint16": { + "float64": 1, + "float32": 1, + "int32": 1, + "int16": 0, + "int8": 0, + "uint32": 1, + "uint16": 1, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "uint8": { + "float64": 1, + "float32": 1, + "int32": 1, + "int16": 1, + "int8": 0, + "uint32": 1, + "uint16": 1, + "uint8": 1, + "uint8c": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "uint8c": { + "float64": 1, + "float32": 1, + "int32": 1, + "int16": 1, + "int8": 0, + "uint32": 1, + "uint16": 1, + "uint8": 1, + "uint8c": 1, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "complex128": { + "float64": 0, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 0, + "bool": 0, + "generic": 1 + }, + "complex64": { + "float64": 0, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 1, + "complex64": 1, + "bool": 0, + "generic": 1 + }, + "bool": { + "float64": 0, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 0, + "complex64": 0, + "bool": 1, + "generic": 1 + }, + "generic": { + "float64": 0, + "float32": 0, + "int32": 0, + "int16": 0, + "int8": 0, + "uint32": 0, + "uint16": 0, + "uint8": 0, + "uint8c": 0, + "complex128": 0, + "complex64": 0, + "bool": 0, + "generic": 1 + } }