@Override public void __setitem__(final PyObject indices, final PyObject pyValue) {
        // Get the shape of the subarray to set.
        final PyMultiarray toStructure = this.indicesToStructure(indices);
        // Convert value to array.
        final PyMultiarray value = PyMultiarray.array(pyValue, this._typecode);
        // Check that array shapes are consistent and get new shape for source
        // array.
        final int[] shape = toStructure.dimensions.clone();
        final int[] strides = new int[toStructure.dimensions.length];
        final int excess = toStructure.dimensions.length
                - value.dimensions.length;
        if (toStructure.dimensions.length < value.dimensions.length) { throw Py
                .ValueError("object too deep for desired array"); }
        for (int i = 0; i < excess; i++) {
            shape[i] = toStructure.dimensions[i];
        }
        for (int i = excess; i < toStructure.dimensions.length; i++) {
            shape[i] = value.dimensions[i - excess];
            strides[i] = value.strides[i - excess];
        }
        value.dimensions = shape;
        value.strides = strides;
        value.setIsContiguous();
        PyMultiarray.copyAToB(value, toStructure);
    }