Example #1
0
def test_atleast1d_without_units():
    """Test that atleast_1d wrapper can handle plain arrays."""
    assert_array_equal(atleast_1d(1), np.array([1]))
    assert_array_equal(atleast_1d([
        1,
    ], [
        2,
    ]), np.array([[
        1,
    ], [
        2,
    ]]))
Example #2
0
def test_atleast1d_without_units():
    """Test that atleast_1d wrapper can handle plain arrays."""
    assert_array_equal(atleast_1d(1), np.array([1]))