Skip to content

Instantly share code, notes, and snippets.

@renato2099
Created August 5, 2015 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renato2099/3837bdf20680799ebbbe to your computer and use it in GitHub Desktop.
Save renato2099/3837bdf20680799ebbbe to your computer and use it in GitHub Desktop.
import org.scalatest.FunSuite
import org.nd4j.api.Implicits._
import org.nd4j.linalg.api.ndarray.INDArray
import org.nd4j.linalg.factory.Nd4j
import scala.language.implicitConversions
class Main$Nd4jPerformanceTest extends FunSuite {
test("ND4j.map.test") {
val data = Array(1.0, 2.0, 3.0, 4.0)
val shape : Array[Int] = Array(2, 2)
val tensor: INDArray = Nd4j.create(data, shape)
// this doesn't compile
tensor.map(p => println(p))
assert(true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment