(self)
| 2211 | assert states.grid == approx(np.arange(10)) |
| 2212 | |
| 2213 | def test_extra_no_shape(self): |
| 2214 | # The shape of the value for "prop" here is (), which is falsey |
| 2215 | # and causes the use of np.full() |
| 2216 | states = ct.SolutionArray(self.gas, 3, extra={"prop": 1}) |
| 2217 | assert states.prop.shape == (3,) |
| 2218 | assert states.prop == approx(np.array((1, 1, 1))) |
| 2219 | |
| 2220 | # Check a multidimensional SolutionArray |
| 2221 | states = ct.SolutionArray(self.gas, (2, 2), extra={"prop": 3}) |
| 2222 | assert states.prop.shape == (2, 2) |
| 2223 | assert states.prop == approx(np.array(((3, 3), (3, 3)))) |
| 2224 | |
| 2225 | def test_extra_not_empty(self): |
| 2226 | """Test that a non-empty SolutionArray raises a ValueError if |
nothing calls this directly
no test coverage detected