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