Skip to content

Commit 810b6f1

Browse files
committed
Merge branch 'rel-0.1.4-SNAPSHOT'
2 parents 0206839 + 56d10bc commit 810b6f1

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Numsca: Numpy for Scala
55
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/be.botkop/numsca_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/be.botkop/numsca_2.12)
66
[![Build Status](https://travis-ci.org/botkop/numsca.svg?branch=master)](https://travis-ci.org/botkop/numsca)
77

8-
Numsca is numpy for scala.
8+
Numsca is Numpy for Scala.
99

10-
Here's the famous [neural network in 11 lines of Python](http://iamtrask.github.io/2015/07/12/basic-python-network/), now in scala:
10+
Here's the famous [neural network in 11 lines of Python](http://iamtrask.github.io/2015/07/12/basic-python-network/), translated to Numsca:
1111

1212
```scala
1313
import botkop.{numsca => ns}
@@ -24,23 +24,25 @@ for (j <- 0 until 60000) {
2424
w0 += x.T.dot(l1Delta)
2525
}
2626
```
27-
In scala it may be a bit longer, but otherwise it's pretty similar.
2827

29-
Another example: a scala translation of Andrej Karpathy's
28+
Another example: a Scala translation of Andrej Karpathy's
3029
['Minimal character-level language model with a Vanilla Recurrent Neural Network'](src/main/scala/botkop/numsca/samples/MinCharRnn.scala).
3130
(Compare with Andrej Karpathy's original [post](https://gist.github.com/karpathy/d4dee566867f8291f086).)
3231

32+
Also have a look at [Scorch](https://github.com/botkop/scorch), a neural net framework in the spirit of [PyTorch](http://pytorch.org/), which uses Numsca.
33+
34+
3335
## Why?
34-
I love scala. I teach myself deep learning. Everything in deep learning is written in python.
35-
This library helps me to quickly translate python and numpy code to my favorite language.
36+
I love Scala. I teach myself deep learning. Everything in deep learning is written in Python.
37+
This library helps me to quickly translate Python and Numpy code to my favorite language.
3638

3739
I hope you find it useful.
3840

3941
Pull requests welcome.
4042

4143
## Disclaimer
42-
This is far from an exhaustive copy of numpy's functionality. I'm adding functionality as I go.
43-
That being said, I think many of the most interesting aspects of numpy like slicing, broadcasting and indexing
44+
This is far from an exhaustive copy of Numpy's functionality. I'm adding functionality as I go.
45+
That being said, I think many of the most interesting aspects of Numpy like slicing, broadcasting and indexing
4446
have been successfully implemented.
4547

4648
## Under the hood
@@ -52,7 +54,7 @@ Add this to build.sbt:
5254
libraryDependencies += "be.botkop" %% "numsca" % "0.1.4"
5355
```
5456

55-
## Importing numsca
57+
## Importing Numsca
5658
```scala
5759
import botkop.{numsca => ns}
5860
import ns.Tensor
@@ -142,10 +144,12 @@ a2: botkop.numsca.Tensor = [0.00, 2.00, 4.00, 6.00, 8.00, 10.00, 12.00, 1
142144

143145
## Slicing
144146
Note:
145-
- step size is not implemented.
146-
- python notation ```t[:3]``` must be written as ```t(0 :> 3)``` or ```t(:>(3))```
147147
- negative indexing is supported
148-
- ellipsis is not implemented
148+
- Python notation ```t[:3]``` must be written as ```t(0 :> 3)``` or ```t(:>(3))```
149+
150+
Not supported (yet):
151+
- step size
152+
- ellipsis
149153

150154
### Single dimension
151155
#### Slice over a single dimension
@@ -208,7 +212,7 @@ scala> tb(2:>, :>)
208212
res15: botkop.numsca.Tensor = [6.00, 7.00, 8.00]
209213
```
210214
Mixed range/integer indexing. Note that integers are implicitly translated to ranges,
211-
and this differs from python.
215+
and this differs from Python.
212216
```scala
213217
scala> tb(1, 0 :> -1)
214218
res1: botkop.numsca.Tensor = [3.00, 4.00]

0 commit comments

Comments
 (0)