def test_diags_bad(self):
        a = array([1, 2, 3, 4, 5])
        b = array([6, 7, 8, 9, 10])
        c = array([11, 12, 13, 14, 15])

        cases = []
        cases.append(([a[:0]], 0, (1, 1)))
        cases.append(([a[:4],b,c[:3]], [-1,0,1], (5, 5)))
        cases.append(([a[:2],c,b[:3]], [-4,2,-1], (6, 5)))
        cases.append(([a[:2],c,b[:3]], [-4,2,-1], None))
        cases.append(([], [-4,2,-1], None))
        cases.append(([1], [-4], (4, 4)))
        cases.append(([a[:0]], [-1], (1, 2)))
        cases.append(([a], 0, None))

        for d, o, shape in cases:
            try:
                assert_raises(ValueError, construct.diags, d, o, shape)
            except:
                print("%r %r %r" % (d, o, shape))
                raise

        assert_raises(TypeError, construct.diags, [[None]], [0])
dataset/ETHPy150Open scipy/scipy/scipy/sparse/tests/test_construct.py/TestConstructUtils.test_diags_bad/original