-
Notifications
You must be signed in to change notification settings - Fork 204
[Types] Add int8 (sbyte) support #567
Copy link
Copy link
Open
Labels
coreInternal engine: Shape, Storage, TensorEngine, iteratorsInternal engine: Shape, Storage, TensorEngine, iteratorsdocumentation-neededFeature requires documentation after implementation or depiction of lack of documentationFeature requires documentation after implementation or depiction of lack of documentationenhancementNew feature or requestNew feature or requestmissing feature/sNumPy function not yet implemented in NumSharpNumPy function not yet implemented in NumSharp
Milestone
Metadata
Metadata
Assignees
Labels
coreInternal engine: Shape, Storage, TensorEngine, iteratorsInternal engine: Shape, Storage, TensorEngine, iteratorsdocumentation-neededFeature requires documentation after implementation or depiction of lack of documentationFeature requires documentation after implementation or depiction of lack of documentationenhancementNew feature or requestNew feature or requestmissing feature/sNumPy function not yet implemented in NumSharpNumPy function not yet implemented in NumSharp
Overview
Add support for
int8(C#sbyte) type to NumSharp. This is one of the NumPy types missing from NumSharp that blocks full NumPy 2.x compatibility.Problem
NumSharp currently supports 12 numeric types but is missing
int8(signed byte):Use cases:
.npyfiles with int8 dtypeProposal
Task List
NPTypeCode.Int8 = 5toNPTypeCode.cs(between Char=4 and Byte=6)np.int8type alias innp.csNPTypeCodeExtensions.GetTypeCode()to handletypeof(sbyte)InfoOf<T>forsbyteUnmanagedStoragetype switchesArraySliceallocation for sbyte_typemap_arr_arrand_typemap_arr_scalarinnp.find_common_type.csC# Type Mapping
Implementation Effort
LOW — sbyte is a built-in C# type with full arithmetic support. Main work is adding to type switches.
Estimated: ~50-100 lines of changes across multiple files.
Related
References