Package mikera.arrayz

Examples of mikera.arrayz.INDArray.dimensionality()


      return (AVector)o;
    } else if (o instanceof double[]) {
      return Vectorz.create((double[])o);
    } else if (o instanceof INDArray) {
      INDArray a=(INDArray)o;
      if (a.dimensionality()!=1) throw new IllegalArgumentException("Cannot coerce INDArray with shape "+a.getShape().toString()+" to a vector");
      return a.asVector();
    } else if (o instanceof List<?>) {
      return Vectorz.create((List<Object>)o);
    } else if (o instanceof Iterable<?>) {
      return Vectorz.create((Iterable<Object>)o);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.