Show / Hide Table of Contents

Interface IStorage

Inherited Members
System.ICloneable.Clone()
Namespace: NumSharp.Core.Interfaces
Assembly: NumSharp.Core.dll
Syntax
public interface IStorage : ICloneable

Properties

| Improve this Doc View Source

DType

Data Type of stored elements

Declaration
Type DType { get; }
Property Value
Type Description
System.Type

numpys equal dtype

| Improve this Doc View Source

Shape

storage shape for outside representation

Declaration
IShape Shape { get; }
Property Value
Type Description
IShape

numpys equal shape

| Improve this Doc View Source

TensorLayout

column wise or row wise order

Declaration
int TensorLayout { get; }
Property Value
Type Description
System.Int32

0 row wise, 1 column wise

Methods

| Improve this Doc View Source

Allocate(Array, Int32)

Allocate memory by Array and tensororder and deduce shape and dtype (default column wise)

Declaration
void Allocate(Array values, int tensorOrder = 1)
Parameters
Type Name Description
System.Array values

elements to store

System.Int32 tensorOrder

row or column wise

| Improve this Doc View Source

Allocate(Type, IShape, Int32)

Allocate memory by dtype, shape, tensororder (default column wise)

Declaration
void Allocate(Type dtype, IShape shape, int tensorOrder = 1)
Parameters
Type Name Description
System.Type dtype

storage data type

IShape shape

storage data shape

System.Int32 tensorOrder

row or column wise

| Improve this Doc View Source

ChangeDataType(Type)

Change dtype of elements

Declaration
void ChangeDataType(Type dtype)
Parameters
Type Name Description
System.Type dtype

new storage data type

| Improve this Doc View Source

ChangeTensorLayout(Int32)

Cange layout to 0 row wise or 1 colum wise

Declaration
void ChangeTensorLayout(int order)
Parameters
Type Name Description
System.Int32 order

0 or 1

| Improve this Doc View Source

CloneData()

Clone internal storage and get reference to it

Declaration
Array CloneData()
Returns
Type Description
System.Array

reference to cloned storage as System.Array

| Improve this Doc View Source

CloneData(Type)

Clone internal storage and cast elements to new dtype

Declaration
Array CloneData(Type dtype)
Parameters
Type Name Description
System.Type dtype

cloned storage data type

Returns
Type Description
System.Array

reference to cloned storage as System.Array

| Improve this Doc View Source

CloneData<T>()

Get all elements from cloned storage as T[] and cast dtype

Declaration
T[] CloneData<T>()
Returns
Type Description
T[]

reference to cloned storage as T[]

Type Parameters
Name Description
T

cloned storgae dtype

| Improve this Doc View Source

GetColumWiseStorage()

Get Back Storage with Columnwise tensor Layout By this method the layout is changed if layout is not columnwise

Declaration
IStorage GetColumWiseStorage()
Returns
Type Description
IStorage

reference to storage (transformed or not)

| Improve this Doc View Source

GetData()

Get reference to internal data storage

Declaration
Array GetData()
Returns
Type Description
System.Array

reference to internal storage as System.Array

| Improve this Doc View Source

GetData(Int32[])

Get single value from internal storage and do not cast dtype

Declaration
object GetData(params int[] indexes)
Parameters
Type Name Description
System.Int32[] indexes

indexes

Returns
Type Description
System.Object

element from internal storage

| Improve this Doc View Source

GetData(Type)

Get reference to internal data storage and cast elements to new dtype

Declaration
Array GetData(Type dtype)
Parameters
Type Name Description
System.Type dtype

new storage data type

Returns
Type Description
System.Array

reference to internal (casted) storage as System.Array

| Improve this Doc View Source

GetData<T>()

Get reference to internal data storage and cast elements to new dtype

Declaration
T[] GetData<T>()
Returns
Type Description
T[]

reference to internal (casted) storage as T[]

Type Parameters
Name Description
T

new storage data type

| Improve this Doc View Source

GetData<T>(Int32[])

Get single value from internal storage as type T and cast dtype to T

Declaration
T GetData<T>(params int[] indexes)
Parameters
Type Name Description
System.Int32[] indexes

indexes

Returns
Type Description
T

element from internal storage

Type Parameters
Name Description
T

new storage data type

| Improve this Doc View Source

GetRowWiseStorage()

Get Back Storage with row wise tensor Layout By this method the layout is changed if layout is not row wise

Declaration
IStorage GetRowWiseStorage()
Returns
Type Description
IStorage

reference to storage (transformed or not)

| Improve this Doc View Source

Reshape(Int32[])

Declaration
void Reshape(params int[] dimensions)
Parameters
Type Name Description
System.Int32[] dimensions
| Improve this Doc View Source

SetData(Array)

Set an array to internal storage and keep dtype

Declaration
void SetData(Array values)
Parameters
Type Name Description
System.Array values
| Improve this Doc View Source

SetData(Array, Type)

Set an Array to internal storage, cast it to new dtype and change dtype

Declaration
void SetData(Array values, Type dtype)
Parameters
Type Name Description
System.Array values
System.Type dtype
| Improve this Doc View Source

SetData(Object, Int32[])

Set 1 single value to internal storage and keep dtype

Declaration
void SetData(object value, params int[] indexes)
Parameters
Type Name Description
System.Object value
System.Int32[] indexes
  • Improve this Doc
  • View Source
Back to top Generated by DocFX