code: public static BasicVector fromCollection(Collection<? extends Number> list) {
          //TODO goto lambdas
          double[] self = new double[list.size()];
          int i = 0;
          for (Number x : list) {
              self[i] = x.doubleValue();
              i++;
          }
          return fromArray(self);
      }
docs: Creates new {@link BasicVector} from
  
  @param list list containing doubles
  
  @return new vector from given double list