@@ -252,7 +252,6 @@ class CheckedSession(Session, AbstractCheckedSession, metaclass=ModelMetaclass):
252
252
>>> class ModelVariables(CheckedSession):
253
253
... # --- declare variables with defined types ---
254
254
... # Their values will be defined at runtime but must match the specified type.
255
- ... variant_name: str
256
255
... birth_rate: Array
257
256
... births: Array
258
257
... # --- declare variables with a default value ---
@@ -271,12 +270,9 @@ class CheckedSession(Session, AbstractCheckedSession, metaclass=ModelMetaclass):
271
270
>>> variant_name = "baseline"
272
271
>>> # Instantiation --> create an instance of the ModelVariables class.
273
272
>>> # Warning: All variables declared without a default value must be set.
274
- >>> m = ModelVariables(
275
- ... variant_name = variant_name,
276
- ... birth_rate = zeros((AGE, GENDER)),
277
- ... births = zeros((AGE, GENDER, TIME), dtype=int),
278
- ... mortality_rate = 0,
279
- ... )
273
+ >>> m = ModelVariables(birth_rate = zeros((AGE, GENDER)),
274
+ ... births = zeros((AGE, GENDER, TIME), dtype=int),
275
+ ... mortality_rate = 0)
280
276
281
277
>>> # ==== model ====
282
278
>>> # In the definition of ModelVariables, the 'birth_rate' variable, has been declared as an Array object.
@@ -354,7 +350,6 @@ class CheckedSession(Session, AbstractCheckedSession, metaclass=ModelMetaclass):
354
350
>>> # ==== output ====
355
351
>>> # save all variables in an HDF5 file
356
352
>>> m.save(f'{variant_name}.h5', display=True)
357
- dumping variant_name ... done
358
353
dumping birth_rate ... done
359
354
dumping births ... done
360
355
dumping mortality_rate ... done
0 commit comments