Random normal using the current time stamp
as the seed

@param rows    the number of rows in the matrix
@param columns the number of columns in the matrix
@return
770288
@Override
    public INDArray randn(long rows, long columns) {
        return randn(new long[] {rows, columns}, System.currentTimeMillis());
    }
1358643
public static INDArray toMatrix(List<Row> rows) {
        INDArray ret = Nd4j.create(rows.size(), rows.get(0).size());
        for (int i = 0; i < ret.rows(); i++) {
            for (int j = 0; j < ret.columns(); j++) {
                ret.putScalar(i, j, rows.get(i).getDouble(j));
            }
        }
        return ret;
    }
460777
public static ColumnMajorSparseMatrix from1DArray(int rows, int columns, double[] array) {
        return CCSMatrix.from1DArray(rows, columns, array);
    }
735427
public static List<Row> minMaxColumns(DataRowsFacade data, List<String> columns) {
        String[] arr = new String[columns.size()];
        for (int i = 0; i < arr.length; i++)
            arr[i] = columns.get(i);
        return minMaxColumns(data, arr);
    }
140700
public Table sampleN(int nRows) {
        Preconditions.checkArgument(nRows > 0 && nRows < rowCount(),
                "The number of rows sampled must be greater than 0 and less than the number of rows in the table.");
        return where(selectNRowsAtRandom(nRows, rowCount()));
    }
132090
public static Matrix constant(int rows, int columns, double constant) {
        return DenseMatrix.constant(rows, columns, constant);
    }
1130849
public static double meanDoublematrixColumn( double[][] matrix, int column ) {

        double mean;

        mean = 0;

        int length = matrix.length;
        for( int i = 0; i < length; i++ ) {
            mean += matrix[i][column];
        }

        return mean / length;

    }
1365312
public static Object gatRandomItem(final List items) {
		if (items == null || items.size() == 0) {
			return null;
		}
		final int itemIndex = (int) (Math.random() * items.size());
		return items.get(itemIndex);
	}
1183723
public void setColumn(int col, double[] values) {
    int offset = translate(0, col, numRows);
    System.arraycopy(values, 0, matrix, offset, values.length);
  }
433269
public static double[][] matrixFromRange (double[] lower, double[] upper, int rows) {
        // Get the number of columns:
        final int cols = lower.length;

        // Initialize the return value:
        final double[][] matrix = new double[rows][cols];

        // Iterate over columns and fill the array:
        for (int col = 0; col < cols; col++) {
            // Get the sequence:
            final double[] sequence = DMatrixUtils.sequence(lower[col], upper[col], rows);

            // Assign to each row in the column:
            for (int row = 0; row < sequence.length; row++) {
                matrix[row][col] = sequence[row];
            }
        }

        // Done, return the populated matrix:
        return matrix;
    }
96677
public Map<Integer, Row> createWorkPatternMap(List<Row> rows)
   {
      Map<Integer, Row> map = new HashMap<Integer, Row>();
      for (Row row : rows)
      {
         map.put(row.getInteger("WORK_PATTERNID"), row);
      }
      return map;
   }
675657
protected ArrayDBIDs rowsBitsetToIDs(long[] rows) {
    ArrayModifiableDBIDs rowIDs = DBIDUtil.newArray(BitsUtil.cardinality(rows));
    DBIDArrayIter iter = this.rowIDs.iter();
    outer: for(int rlpos = 0; rlpos < rows.length; ++rlpos) {
      long rlong = rows[rlpos];
      // Fast skip blocks of 64 masked values.
      if(rlong == 0L) {
        iter.advance(Long.SIZE);
        continue;
      }
      for(int i = 0; i < Long.SIZE; ++i, rlong >>>= 1, iter.advance()) {
        if(!iter.valid()) {
          break outer;
        }
        if((rlong & 1L) == 1L) {
          rowIDs.add(iter);
        }
      }
    }
    return rowIDs;
  }
479991
protected long countNonNulls(long rows) throws IOException {
    if (present != null) {
      long result = 0;
      for(long c=0; c < rows; ++c) {
        if (present.next() == 1) {
          result += 1;
        }
      }
      return result;
    } else {
      return rows;
    }
  }
609316
@SafeVarargs
  public final TableBuilder columns(String... columns) {
    if (columns == null || columns.length == 0) {
      throw new InvalidOperationException("Columns array is null or empty.");
    }
    if (tableColumns != null) {
      throw new InvalidOperationException("The table columns are already defined.");
    }
    tableColumns = columns.clone();
    return this;
  }
1056318
public static double varianceDoublematrixColumn( double[][] matrix, int column, double mean )

    {

        double variance;

        variance = 0;

        for( int i = 0; i < matrix.length; i++ ) {
            variance += (matrix[i][column] - mean) * (matrix[i][column] - mean);
        }

        return variance / matrix.length;

    }
321835
public static DenseMatrix from1DArray(int rows, int columns, double[] array) {
        return Basic1DMatrix.from1DArray(rows, columns, array);
    }
577209
@Override
    public INDArray randn(long rows, long columns, long seed) {
        Nd4j.getRandom().setSeed(seed);
        return randn(new long[] {rows, columns}, Nd4j.getRandom());
    }