docs: def to_java_doubles(m):
      '''
      to_java_doubles(m) yields a java array object for the vector or matrix m.
      '''
      global _java
      if _java is None: _init_registration()
      m = np.asarray(m)
      dims = len(m.shape)
      if dims > 2: raise ValueError('1D and 2D arrays supported only')
      bindat = serialize_numpy(m, 'd')
      return (_java.jvm.nben.util.Numpy.double2FromBytes(bindat) if dims == 2
              else _java.jvm.nben.util.Numpy.double1FromBytes(bindat))