# Buggy code
def _create_chunk(self, output_idx, index, **kw):
    inputs = self.inputs
    if kw.get("index_value", None) is None and inputs[0].index_value is not None:
        input_index_value = inputs[0].index_value
        index_min_max = self.index_min_max
        if index_min_max is not None:
            kw["index_value"] = filter_index_value(input_index_value, index_min_max)
        else:
            kw["index_value"] = parse_index(
                inputs[0].index_value.to_pandas(),
                key=tokenize(input_index_value.key, type(self).__name__),
            )
    if (
        kw.get("columns_value", None) is None
        and getattr(inputs[0], "columns", None) is not None
    ):
        input_columns_value = inputs[0].columns
        input_dtypes = inputs[0].dtypes
        column_min_max = self.column_min_max
        if column_min_max is not None:
            kw["columns_value"] = filter_index_value(
                input_columns_value, column_min_max, store_data=True
            )
        else:
            kw["columns_value"] = parse_index(
                inputs[0].columns.to_pandas(),
                key=tokenize(input_columns_value.key, type(self).__name__),
            )
        kw["dtypes"] = input_dtypes[kw["columns_value"].to_pandas()]
        column_shuffle_size = self.column_shuffle_size
        if column_shuffle_size is not None:
            self._column_shuffle_segments = hash_dtypes(
                input_dtypes, column_shuffle_size
            )
    if kw.get("dtype", None) and getattr(inputs[0], "dtype", None) is not None:
        kw["dtype"] = inputs[0].dtype
    if kw.get("name", None) and getattr(inputs[0], "name", None) is not None:
        kw["name"] = inputs[0].dtype
    return super(DataFrameIndexAlignMap, self)._create_chunk(output_idx, index, **kw)


# Traceback (Exception)
In [28]: df = md.DataFrame(np.random.rand(10, 2))

In [29]: df + np.random.rand(10, 2)
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-29-4a212df011a8> in <module>
----> 1 df + np.random.rand(10, 2)

~/Documents/mars_dev/mars/mars/dataframe/utils.py in wrapper(*args, **kwargs)
613     def wrapper(*args, **kwargs):
614         try:
--> 615             return func(*args, **kwargs)
616         except NotImplementedError:
617             return NotImplemented

~/Documents/mars_dev/mars/mars/dataframe/arithmetic/add.py in add(df, other, axis, level, fill_value)
33
34 def add(df, other, axis='columns', level=None, fill_value=None):
---> 35     other = wrap_sequence(other)
36     op = DataFrameAdd(axis=axis, level=level, fill_value=fill_value, lhs=df, rhs=other)
37     return op(df, other)

~/Documents/mars_dev/mars/mars/dataframe/utils.py in wrap_sequence(seq)
606
607     if isinstance(seq, (list, tuple, np.ndarray, TENSOR_TYPE)):
--> 608         seq = Series(seq)
609     return seq
610

~/Documents/mars_dev/mars/mars/dataframe/initializer.py in __init__(self, data, index, dtype, name, copy, chunk_size, gpu, sparse)
46             series = data
47         else:
---> 48             pd_series = pd.Series(data, index=index, dtype=dtype, name=name, copy=copy)
49             series = from_pandas_series(pd_series, chunk_size=chunk_size, gpu=gpu, sparse=sparse)
50         super(Series, self).__init__(series.data)

~/miniconda3/lib/python3.7/site-packages/pandas/core/series.py in __init__(self, data, index, dtype, name, copy, fastpath)
312                     data = data.copy()
313             else:
--> 314                 data = sanitize_array(data, index, dtype, copy, raise_cast_failure=True)
315
316                 data = SingleBlockManager(data, index, fastpath=True)

~/miniconda3/lib/python3.7/site-packages/pandas/core/internals/construction.py in sanitize_array(data, index, dtype, copy, raise_cast_failure)
727     elif subarr.ndim > 1:
728         if isinstance(data, np.ndarray):
--> 729             raise Exception("Data must be 1-dimensional")
730         else:
731             subarr = com.asarray_tuplesafe(data, dtype=dtype)

Exception: Data must be 1-dimensional

# Fixed code
def _create_chunk(self, output_idx, index, **kw):
    inputs = self.inputs
    if kw.get("index_value", None) is None and inputs[0].index_value is not None:
        input_index_value = inputs[0].index_value
        index_min_max = self.index_min_max
        if index_min_max is not None:
            kw["index_value"] = filter_index_value(input_index_value, index_min_max)
        else:
            kw["index_value"] = parse_index(
                inputs[0].index_value.to_pandas(),
                key=tokenize(input_index_value.key, type(self).__name__),
            )
    if (
        kw.get("columns_value", None) is None
        and getattr(inputs[0], "columns_value", None) is not None
    ):
        input_columns_value = inputs[0].columns_value
        input_dtypes = inputs[0].dtypes
        column_min_max = self.column_min_max
        if column_min_max is not None:
            kw["columns_value"] = filter_index_value(
                input_columns_value, column_min_max, store_data=True
            )
        else:
            kw["columns_value"] = parse_index(
                inputs[0].columns_value.to_pandas(),
                key=tokenize(input_columns_value.key, type(self).__name__),
            )
        kw["dtypes"] = input_dtypes[kw["columns_value"].to_pandas()]
        column_shuffle_size = self.column_shuffle_size
        if column_shuffle_size is not None:
            self._column_shuffle_segments = hash_dtypes(
                input_dtypes, column_shuffle_size
            )
    if kw.get("dtype", None) and getattr(inputs[0], "dtype", None) is not None:
        kw["dtype"] = inputs[0].dtype
    if kw.get("name", None) and getattr(inputs[0], "name", None) is not None:
        kw["name"] = inputs[0].dtype
    return super(DataFrameIndexAlignMap, self)._create_chunk(output_idx, index, **kw)