---
title: "allocateUninitialized(scalarType:shape:stride:)"
framework: accelerate
role: symbol
role_heading: Type Method
path: "accelerate/bnnstensor/allocateuninitialized(scalartype:shape:stride:)"
---

# allocateUninitialized(scalarType:shape:stride:)

Creates a BNNSTensor of the specified data type with allocated memory.

## Declaration

```swift
static func allocateUninitialized(scalarType: any BNNSScalar.Type, shape: [Int], stride: [Int]) -> BNNSTensor
```

## Parameters

- `scalarType`: The data type.
- `shape`: The shape of the tensor.
- `stride`: The stride of the tensor.
