Ejemplo n.º 1
0
def test_fromstring_token1():
    s = "1 2.3 4"
    obs = utils.fromstring_token(s)
    exp = np.fromstring(s, sep=" ")
    assert_array_equal(obs, exp)
Ejemplo n.º 2
0
def test_fromstring_token3():
    s = "1,  2.3, 4"
    obs = utils.fromstring_token(s, sep=' ,')
    exp = np.fromstring(s, sep=", ")
    assert_array_equal(obs, exp)
Ejemplo n.º 3
0
def test_fromstring_token4():
    s = "1, 2.3 ,4"
    obs = utils.fromstring_token(s, sep=' ,', inplace=True)
    exp = np.array([1.0, 2.3, 4.0])
    assert_array_equal(obs, exp)
Ejemplo n.º 4
0
def test_fromstring_token2():
    s = "1-2.3-4"
    obs = utils.fromstring_token(s, sep='-')
    exp = np.fromstring(s, sep="-")
    assert_array_equal(obs, exp)
Ejemplo n.º 5
0
def test_fromstring_token1():
    s = "1 2.3 4"
    obs = utils.fromstring_token(s)
    exp = np.fromstring(s, sep=" ")
    assert_array_equal(obs, exp)
Ejemplo n.º 6
0
def test_fromstring_token4():
    s = "1, 2.3 ,4"
    obs = utils.fromstring_token(s, sep=' ,', inplace=True)
    exp = np.array([1.0, 2.3, 4.0])
    assert_array_equal(obs, exp)
Ejemplo n.º 7
0
def test_fromstring_token3():
    s = "1,  2.3, 4"
    obs = utils.fromstring_token(s, sep=' ,')
    exp = np.fromstring(s, sep=", ")
    assert_array_equal(obs, exp)
Ejemplo n.º 8
0
def test_fromstring_token2():
    s = "1-2.3-4"
    obs = utils.fromstring_token(s, sep='-')
    exp = np.fromstring(s, sep="-")
    assert_array_equal(obs, exp)