code: static
  	public NDArray parseNpy(InputStream is) throws IOException {
  		byte[] magicBytes = new byte[MAGIC_STRING.length];
  
  		ByteStreams.readFully(is, magicBytes);
  
  		if(!Arrays.equals(magicBytes, MAGIC_STRING)){
  			throw new IOException();
  		}
  
  		int majorVersion = readUnsignedByte(is);
  		int minorVersion = readUnsignedByte(is);
  
  		if(majorVersion != 1 || minorVersion != 0){
  			throw new IOException();
  		}
  
  		int headerLength = readUnsignedShort(is, ByteOrder.LITTLE_ENDIAN);
  
  		if(headerLength < 0){
  			throw new IOException();
  		}
  
  		byte[] headerBytes = new byte[headerLength];
  
  		ByteStreams.readFully(is, headerBytes);
  
  		String header = new String(headerBytes);
  
  		// Remove trailing whitespace
  		header = header.trim();
  
  		Map<String, ?> headerDict = parseDict(header);
  
  		Object descr = headerDict.get("descr");
  		Boolean fortranOrder = (Boolean)headerDict.get("fortran_order");
  		Object[] shape = (Object[])headerDict.get("shape");
  
  		byte[] data = ByteStreams.toByteArray(is);
  
  		NDArray array = new NDArray();
  		array.__setstate__(new Object[]{Arrays.asList(majorVersion, minorVersion), shape, descr, fortranOrder, data});
  
  		return array;
  	}
docs: http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html