# ArrayMath.AsVector Method

## Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

 AsVector(T[], ArrayMutability) Converts an array to a vector without copying. AsVector(T[], Int32, ArrayMutability) Converts an array to a vector without copying.

## ArrayMath.AsVector<T>(T[], ArrayMutability)

Converts an array to a vector without copying.
C#
``````public static DenseVector<T> AsVector<T>(
this T[] values,
ArrayMutability mutability = ArrayMutability.Immutable
)
``````

#### Parameters

values  T[]
An array.
mutability  ArrayMutability  (Optional)
Specifies the mutability of the vector.

#### Type Parameters

T
The type of the elements of the array.

#### Return Value

DenseVector<T>
The array values converted to a vector.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

## ArrayMath.AsVector<T>(T[], Int32, ArrayMutability)

Converts an array to a vector without copying.
C#
``````public static DenseVector<T> AsVector<T>(
this T[] values,
int length,
ArrayMutability mutability = ArrayMutability.Immutable
)
``````

#### Parameters

values  T[]
An array.
length  Int32
The length of the vector.
mutability  ArrayMutability  (Optional)
Specifies the mutability of the vector.

#### Type Parameters

T
The type of the elements of the array.

#### Return Value

DenseVector<T>
The array values converted to a vector.

#### Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type T[]. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).