Skip to content

Commit a18157d

Browse files
authored
Update
1 parent f43cdab commit a18157d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
# multidimensional_array_cpp
22
A light weight implementation of an multidimensional array in cpp
3+
4+
# Usage
5+
I tried to make it look very much like numpy arrays
6+
```cpp
7+
Array<int> a = {1,2,24,2};
8+
Array<int> b = a + 9;
9+
Array<int> c = a[{true,false,false,true}];
10+
Array<int> x = a[{0,1,2,0,2,2,1,0}];
11+
Array<int> a = {{1,2,3},{4,5,6}};
12+
Array<int> b = a[_][{1,2}];
13+
```
14+
Some functionality is still missing like assigning a array to a sup part of the array,
15+
also using [_][y] operators will be a bit confusing sometimes since it is implecitly (array[:])[y] in python
16+
not standard [:,y].
17+
18+
Appart from that its pretty cool and you can implement algorithms fast with it in a python style syntax :)

0 commit comments

Comments
 (0)