Simpeg

Latest version: v0.23.0

Safety actively analyzes 682387 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 11

0.11.6

- from pr 799
- commits from lheagy
- review from fourndo

Summary
- break up Regularization.py into multiple files in a `regularization` module
- Regularization Mesh in `regularization_mesh.py`
- `BaseRegularization` and `BaseComboRegularization` in `base.py`
- Tikhonov and Simple in `tikhonov.py`
- Sparse in `sparse.py`

0.11.5

- from pr 769
- commits from prisae
- review from lheagy

Replace `func versions` by `class Versions`

Turns out that there is a way to have html in a notebook and non-html in all the rest without even checking if you are in a notebook or not (thanks banesullivan; https://github.com/simpeg/discretize/issues/142).

All that is needed is a `Versions`-class which has the right functions linked to `__repr__` and `_repr_html_`:

class Versions:

def __init__(self, add_pckg=None, ncol=4):
self.add_pckg = add_pckg
self.ncol = ncol

def __repr__(self):
return versions_text(self.add_pckg)

def _repr_html_(self):
return versions_html(self.add_pckg, self.ncol)


By removing the old functions, respectively integrating the relevant parts into the new class, the whole version printing utility gets a lot simpler (however, it is not backwards compatible).

Before, you had to do

from SimPEG import versions
versions()

in Python, IPython etc, and in Jupyter

from SimPEG import versions
versions('HTML')


Updating your code

Now, you simply do

from SimPEG import Versions
Versions()

EVERYWHERE (note the uppercase `V`), and it will automatically print a html table in a notebook, and plain text everywhere else.

0.11.4

updates to keep pace with changes in simpeg/discretize134

0.11.3

- from pr 770
- commits from kalen-sj
- review from: fourndo, lheagy


A complicated pattern that was copy/pasted several times in the code was able to be replaced with a simple np.where. An example:

`actv = np.asarray([inds for inds, elem in enumerate(actv, 1) if elem], dtype=int) - 1`
is now
`actv = np.where(actv)[0]`

Also, a few spelling mistakes and corrections in the examples. A couple of cases where variables were defined twice before use are now just done once.

0.11.2

- commits from: thast, fourndo
- review from: fourndo


This PR addresses issue 761 and follows PR 758 and PR 757 .

There was a naming discrepancy in the `PF` module and that causes me some trouble.
In the `Gravity` module, there are two aliases for `rhoMap`: [`mapping`](https://github.com/simpeg/simpeg/blob/f4d03c44d7bd0369bf73b5b51131bd7f0c6a718d/SimPEG/PF/Gravity.py#L50) and [`mapPair`](https://github.com/simpeg/simpeg/blob/f4d03c44d7bd0369bf73b5b51131bd7f0c6a718d/SimPEG/PF/Gravity.py#L191).
In the `Magnetics` module, there is one alias for `chiMap`: [ `modelMap`](https://github.com/simpeg/simpeg/blob/f4d03c44d7bd0369bf73b5b51131bd7f0c6a718d/SimPEG/PF/Magnetics.py#L255).

This PR settle for `modelMap` as only alias, consistent with the definition of the `LinearProblem` class in `Problem.py`

Additional: Fix mapping name in `LinearProblem` (from `mapping` (depreciated) to `modelMap`)

0.11.1

- from pr 757
- commits from: thast
- review from: fourndo

This formulation takes into account the regularization mapping into the preconditioner and remove the need to check for a specific wiresmap.

Page 3 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.