Skip to content

Commit

Permalink
Doc : Append doc
Browse files Browse the repository at this point in the history
  • Loading branch information
dotchris90 committed Dec 22, 2018
1 parent 4bd45c6 commit bf55347
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docfx_project/api/index.md
@@ -1,2 +1,3 @@
# PLACEHOLDER
TODO: Add .NET projects to the *src* folder and run `docfx` to generate **REAL** *API Documentation*!
# NumSharp docfx documentation

This is the autogenerated documentation of NumSharp
38 changes: 36 additions & 2 deletions docfx_project/articles/NDArray.Creation.md
@@ -1,4 +1,4 @@
# Array creation
# Array creation

Before we do some fancy numeric stuff or even machine learning we have to clear one thing.

Expand Down Expand Up @@ -55,6 +55,16 @@ using NumSharp.Core;
NDArray nd = new double[]{1,2,3,4};
```

And for matrix and n dim tensors also work the same.

```CSHARP
using NumSharp.Core;

NDArray nd = new double[,]{{1,2,3},{4,5,6}};
```

Beside the .NET array to NDArray converting there exist different kinds of methods which also exist in numpy.

**Create by given range**

```CSHARP
Expand All @@ -67,4 +77,28 @@ var np1 = np.arange(10);
// this time start with 1, step 2
// and do it as long as smaller than 10
var np2 = np.arange(1,10,2);
```
```

**Create diagonal matrix**

```CSHARP
using NumSharp.Core;

// simple 5x5 eye matrix
var nd1 = np.eye(5);

// 3x3 eye matrix but elements different diagonal
nd1 = np.eye(3,1);
```

**Create by linspace**

```CSHARP
using NumSharp.Core;

// create vector with 50 elements, from 4 to 10
// include last element
// and convert them to double (float64)
var nd1 = np.linspace(4,10, 50, true, np.float64);
```

17 changes: 17 additions & 0 deletions docfx_project/articles/NDArray.LinAlg.md
@@ -0,0 +1,17 @@
# Linear algebra

Now we got some arrays so we should understand what we can do with it.

## element wise operation

## Matrix Transpose

## Matrix and Vector multiplication

## Solve Linear Equation

## QR decomposition

## Inverse of Matrix

## SVD
5 changes: 4 additions & 1 deletion docfx_project/articles/intro.md
Expand Up @@ -39,7 +39,9 @@ NDStorage is an object which stores the data of a tesor in a single 1D array. Si

**But hold on! How the data comes into this 1D arrayand how we get them back?**

NDStorage has a property called "shape". The shape is a small but important class in NumSharp. It stores the dimensions and most important! it determines which element in the 1D array is selected by given indexes.
NDStorage has a property called "shape". The shape is a small but important class in NumSharp. It stores the dimensions and most important! it determines which element in the 1D array is selected by given indexes.

To understand the methods for determines 1D internal storage index by NDArray indexes and vice versa we give examples of different tensor types.

**Vector**

Expand Down Expand Up @@ -97,6 +99,7 @@ So fill first dimension, increase next, fill again, etc. also in n dimensional t

And this you can imagine as **forward filling layout**.

That's it. Now you have enough knowledge about NDArray, NDStorage and Shape. Check the other chapters for a how to use. :)



Expand Down
6 changes: 5 additions & 1 deletion docfx_project/articles/toc.yml
@@ -1,4 +1,8 @@
- name: Introduction
href: intro.md
- name: Array Creation
href: NDArray.Creation.md
href: NDArray.Creation.md
- name: Linear Algebra
href: NDArray.LinAlg.md


0 comments on commit bf55347

Please sign in to comment.