Examples

Here we provide some illustrative examples. You can reproduce all of these examples in your own install of Larch, as all of the example data is included with the standard distribution. To work with any objects you find in the examples, a handy function is provided to extract that object directly into your workspace:

larch.examples.reproduce(n, extract='m')

Run an example code section (from the documentation) and give the result.

Parameters:
  • n (int) – The number of the example to reproduce.
  • extract (str or iterable of str) – The name of the object of the example to extract. By default m but it any named object that exists in the example namespace can be returned. Give a list of str to get multiple objects.