我想要在 python 中获得的相同结果
x=np.random.normal(0, 1, (n_samples, n_features))
我努力了:
import breeze.linalg._
object HelloWorld {
def main(args: Array[String]) {
println("Start")
val n_samples = 5
val n_features = 3
val normal01 = breeze.stats.distributions.Gaussian(0, 1)
val samples = normal01.sample(n_features*n_features)
val X = DenseMatrix(n_samples, n_features, samples) // return an error
//print(X)
}
}
错误在哪里?