()
| 3156 | |
| 3157 | |
| 3158 | def test_from_func(): |
| 3159 | x = np.arange(10) |
| 3160 | f = lambda n: n * x |
| 3161 | d = from_func(f, (10,), x.dtype, kwargs={"n": 2}) |
| 3162 | |
| 3163 | assert d.shape == x.shape |
| 3164 | assert d.dtype == x.dtype |
| 3165 | assert_eq(d, 2 * x) |
| 3166 | assert same_keys(d, from_func(f, (10,), x.dtype, kwargs={"n": 2})) |
| 3167 | |
| 3168 | |
| 3169 | def test_concatenate3_2(): |