Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
k-arindam authored Oct 8, 2024
1 parent 07e2a05 commit f7db5cf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,32 @@ In any Swift file where you want to use SwiftNP:
import SwiftNP
```

Usage
## Usage

Creating an NDArray
### Creating an NDArray

You can create a multi-dimensional array by specifying the shape and default values:

```swift
let array = SNP.ones(shape: [1, 3, 512, 512])
```

Basic Array Operations
### Basic Array Operations

SwiftNP supports element-wise operations, reshaping, and much more:

```swift
let reshapedArray = array.reshape([1, 9])
```

Data Types
### Data Types

SwiftNP supports a wide range of numeric data types. You can specify the data type when creating an NDArray:

```swift
let floatArray = NDArray(shape: [2, 2], dtype: .float64, defaultValue: 21.0)
```

License
## License

This project is licensed under the MIT License. See the LICENSE file for details.
This project is licensed under the MIT License. See the LICENSE file for details.

0 comments on commit f7db5cf

Please sign in to comment.