def test_matrix_col_2d(type_func):
    matrix = type_func([['s1t1', 's1t2'], ['s2t1', 's2t2']])

    assert helpers.fix_numpy_array_equality(
        multioutputs._matrix_col(matrix, 0) ==
        helpers.fix_numpy_array_equality(type_func(['s1t1', 's2t1'])))

    assert helpers.fix_numpy_array_equality(
        multioutputs._matrix_col(matrix, 1) ==
        helpers.fix_numpy_array_equality(type_func(['s1t2', 's2t2'])))
def test_matrix_col_2d_list_of_arrays():
    matrix = [numpy.array(['s1t1', 's1t2']), numpy.array(['s2t1', 's2t2'])]

    assert helpers.fix_numpy_array_equality(
        multioutputs._matrix_col(matrix, 0) ==
        helpers.fix_numpy_array_equality(['s1t1', 's2t1']))

    assert helpers.fix_numpy_array_equality(
        multioutputs._matrix_col(matrix, 1) ==
        helpers.fix_numpy_array_equality(['s1t2', 's2t2']))
def test_matrix_col_1d(type_func):
    matrix = type_func(['s1t1', 's2t1'])

    assert (multioutputs._matrix_col(matrix, 0) == 's1t1')

    assert (multioutputs._matrix_col(matrix, 1) == 's2t1')