|
5603 | 5603 | " if (\n", |
5604 | 5604 | " \"exp_base\" in globals()\n", |
5605 | 5605 | " and isinstance(exp_base, Exposures)\n", |
5606 | | - " and exp_base.description != str(filename)\n", |
| 5606 | + " and exp_base.description == str(filename)\n", |
5607 | 5607 | " ):\n", |
5608 | | - " exp_base = Exposures.from_hdf5(filename)\n", |
5609 | | - " exp_base.description = str(filename)\n", |
| 5608 | + " pass # if correct file is already loaded in memory, we do not need to reload it\n", |
5610 | 5609 | " else:\n", |
5611 | 5610 | " exp_base = Exposures.from_hdf5(filename)\n", |
5612 | 5611 | " exp_base.description = str(filename)\n", |
|
5630 | 5629 | " \"haz_base\" in globals()\n", |
5631 | 5630 | " and isinstance(haz_base, Hazard)\n", |
5632 | 5631 | " and hasattr(haz_base, \"description\")\n", |
5633 | | - " and haz_base.description != str(filename)\n", |
| 5632 | + " and haz_base.description == str(filename)\n", |
5634 | 5633 | " ):\n", |
5635 | | - " haz_base = Hazard.from_hdf5(filename)\n", |
5636 | | - " haz_base.description = str(filename)\n", |
| 5634 | + " pass\n", |
5637 | 5635 | " else:\n", |
5638 | 5636 | " haz_base = Hazard.from_hdf5(filename)\n", |
5639 | 5637 | " setattr(haz_base, \"description\", str(filename))\n", |
|
5712 | 5710 | "source": [ |
5713 | 5711 | "# Ordering of the samples by hazard first and exposures second\n", |
5714 | 5712 | "output_imp = calc_imp.make_sample(N=2**2, sampling_kwargs={\"skip_values\": 2**3})\n", |
5715 | | - "output_imp.order_samples(by=[\"f_haz\", \"f_exp\"])" |
| 5713 | + "output_imp.order_samples(by_parameters=[\"f_haz\", \"f_exp\"])" |
5716 | 5714 | ] |
5717 | 5715 | }, |
5718 | 5716 | { |
|
0 commit comments