def _construct(self, shape, value=None, dtype=None, **kwargs):
if isinstance(shape, int):<EOL><INDENT>shape = tuple([shape] * self._ndim)<EOL><DEDENT>if value is not None:<EOL><INDENT>if is_scalar(value):<EOL><INDENT>if value == '<STR_LIT>':<EOL><INDENT>arr = None<EOL>kwargs.pop(self._typ._info_axis_name, None)<EOL><DEDENT>else:<EOL><INDENT>arr = np.empty(shape, dtype=dtype)<EOL>arr.fill(value)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>fshape = np.prod(shape)<EOL>arr = value.ravel()<EOL>new_shape = fshape / arr.shape[<NUM_LIT:0>]<EOL>if fshape % arr.shape[<NUM_LIT:0>] != <NUM_LIT:0>:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>arr = np.repeat(arr, new_shape).reshape(shape)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>arr = np.random.randn(*shape)<EOL><DEDENT>return self._typ(arr, dtype=dtype, **kwargs)<EOL>
construct an object for the given shape
            if value is specified use that if its a scalar
            if value is an array, repeat it as needed