MCPcopy
hub / github.com/GPflow/GPflow / test_construct_parameter_with_variable_shape

Function test_construct_parameter_with_variable_shape

tests/gpflow/test_base.py:220–232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218
219
220def test_construct_parameter_with_variable_shape() -> None:
221 parameter = gpflow.Parameter([[1, 2, 3]], shape=[None, None])
222
223 values: Sequence[AnyNDArray] = [
224 np.ones((0, 0), dtype=default_float()),
225 np.ones((1, 3), dtype=default_float()),
226 np.ones((3, 1), dtype=default_float()),
227 np.ones((3, 4), dtype=default_float()),
228 ]
229
230 for value in values:
231 parameter.assign(value)
232 np.testing.assert_equal(value, parameter.numpy())
233
234
235def test_construct_parameter_with_variable_shape__different_constrained_shape() -> None:

Callers

nothing calls this directly

Calls 2

assignMethod · 0.95
default_floatFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…