()
| 3149 | |
| 3150 | |
| 3151 | def test_from_func(): |
| 3152 | x = np.arange(10) |
| 3153 | f = lambda n: n * x |
| 3154 | d = from_func(f, (10,), x.dtype, kwargs={"n": 2}) |
| 3155 | |
| 3156 | assert d.shape == x.shape |
| 3157 | assert d.dtype == x.dtype |
| 3158 | assert_eq(d, 2 * x) |
| 3159 | assert same_keys(d, from_func(f, (10,), x.dtype, kwargs={"n": 2})) |
| 3160 | |
| 3161 | |
| 3162 | def test_concatenate3_2(): |