Questions tagged [gonum]

21 questions
0
votes
1 answer

Declaring types in Go for a sample gonum application

Being an ardent fan of numpy, I was pleased to discover that a library for golang was in progress. I wrote a small test program, based heavily on the documentation, that looks like the following: package main import ( "fmt" "math" …
CaitlinG
  • 1,955
  • 3
  • 25
  • 35
0
votes
1 answer

Vectorise a function taking advantage of concurrency

For a simple neural network I want to apply a function to all the values of a gonum VecDense. Gonum has an Apply method for Dense matrices, but not for vectors, so I am doing this by hand: func sigmoid(z float64) float64 { …
James K
  • 3,692
  • 1
  • 28
  • 36
0
votes
1 answer

Gonum Plot Loop Through Slice

I'm trying to add multiple plots by using a loop, but I can't seem to figure out how to put the lines in. Here is the code I'm working on: func plot_stochastic_processes(processes [][]float64, title string) { p, err := plot.New() if err !=…
-1
votes
1 answer

How do I element-wise square root a gonum matrix?

I was going to use Pow but it only seems to accept powering by integer values. For example, the element-wise square root matrix m of matrix a.: a = ⎡ 4 9⎤ ⎣16 25⎦ m = ⎡2 3⎤ ⎣4 5⎦
alpaca
  • 1,211
  • 13
  • 23
-1
votes
1 answer

Multiple plots in single image in gonum/plot

Is it possible to combine multiple plots in a single image in gonum/plot? They should have their own axes. Is it possible to stack them vertically, horizontally or probably in a grid? In matplotlib it would look like this.
Igor Mikushkin
  • 1,250
  • 16
  • 25
-2
votes
1 answer

Multiple line plots sharing abscissas axis in gonum/plot

Is it possible to make multiple line plots with common abscissas axis in gonum/plot? In matplotlib it would look like this.
Igor Mikushkin
  • 1,250
  • 16
  • 25
1
2