def create_from_array(self, blockname, array, Nfile=None, memorylimit=<NUM_LIT> * <NUM_LIT> * <NUM_LIT>):
size = len(array)<EOL>sizeperfile = <NUM_LIT:32> * <NUM_LIT> * <NUM_LIT><EOL>if Nfile is None:<EOL><INDENT>Nfile = (size + sizeperfile - <NUM_LIT:1>) // sizeperfile<EOL><DEDENT>dtype = numpy.dtype((array.dtype, array.shape[<NUM_LIT:1>:]))<EOL>itemsize = dtype.itemsize<EOL>itemlimit = memorylimit // dtype.itemsize // <NUM_LIT> * <NUM_LIT><EOL>with self.create(blockname, dtype, size, Nfile) as b:<EOL><INDENT>for i in range(<NUM_LIT:0>, len(array), itemlimit):<EOL><INDENT>b.write(i, numpy.array(array[i:i+itemlimit]))<EOL><DEDENT><DEDENT>return self.open(blockname)<EOL>
create a block from array like objects
            The operation is well defined only if array is at most 2d.

            Parameters
            ----------
            array : array_like,
                array shall have a scalar dtype. 
            blockname : string
                name of the block
            Nfile : int or None
                number of physical files. if None, 32M items per file
                is used.
            memorylimit : int
                number of bytes to use for the buffering. relevant only if
                indexing on array returns a copy (e.g. IO or dask array)