Skip to content

Commit e408045

Browse files
committed
rename
1 parent 9d702b0 commit e408045

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ndarray.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const (
1010
MaxDimensions = 32
1111
)
1212

13-
// Numeric represents the constraint for numeric types that can be used in NdArray
14-
type Numeric interface {
13+
// NdArrayElementType represents the constraint for numeric types that can be used in NdArray
14+
type NdArrayElementType interface {
1515
~float64
1616
}
1717

@@ -24,15 +24,15 @@ type Numeric interface {
2424
// ResetAppendIndex to reset the array for reuse after sending data.
2525
//
2626
// By default, all values in the array are initialized to zero.
27-
type NdArray[T Numeric] struct {
27+
type NdArray[T NdArrayElementType] struct {
2828
data []T
2929
shape []uint
3030
appendIndex uint
3131
}
3232

3333
// NewNDArray creates a new NdArray with the specified shape.
3434
// All elements are initialized to zero by default.
35-
func NewNDArray[T Numeric](shape ...uint) (*NdArray[T], error) {
35+
func NewNDArray[T NdArrayElementType](shape ...uint) (*NdArray[T], error) {
3636
if err := validateShape(shape); err != nil {
3737
return nil, fmt.Errorf("invalid shape: %w", err)
3838
}

0 commit comments

Comments
 (0)