Giter Site home page Giter Site logo

gempy_engine's People

Contributors

agzimmerman avatar japhiolite avatar leguark avatar

Stargazers

 avatar

Watchers

 avatar  avatar

gempy_engine's Issues

ValueError on import

Excited to try out the latest version of GemPy that was just released, but I'm having some trouble immediately upon import: ValueError: mutable default <class 'slice'> for field slice_feature is not allowed: use default_factory

>>> import gempy
Setting Backend To: AvailableBackends.PYTORCH
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/python/lib/python3.11/site-packages/gempy/__init__.py", line 10, in <module>
    from .core import data
  File "/python/lib/python3.11/site-packages/gempy/core/data/__init__.py", line 1, in <module>
    from .geo_model import GeoModel
  File "/python/lib/python3.11/site-packages/gempy/core/data/geo_model.py", line 8, in <module>
    import gempy_engine.core.data.engine_grid
  File "/python/lib/python3.11/site-packages/gempy_engine/__init__.py", line 1, in <module>
    from gempy_engine.API.model.model_api import compute_model
  File "/python/lib/python3.11/site-packages/gempy_engine/API/model/model_api.py", line 6, in <module>
    from ...core.data.interp_output import InterpOutput
  File "/python/lib/python3.11/site-packages/gempy_engine/core/data/__init__.py", line 3, in <module>
    from .kernel_classes.surface_points import SurfacePoints, SurfacePointsInternals
  File "/python/lib/python3.11/site-packages/gempy_engine/core/data/kernel_classes/surface_points.py", line 13, in <module>
    @dataclass(frozen=False)
     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dataclasses.py", line 1220, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dataclasses.py", line 958, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dataclasses.py", line 815, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'slice'> for field slice_feature is not allowed: use default_factory

Please let me know if there are addition packages or context you'd like me to provide, my system imformation is generally:

>>> from scooby import Report
>>> Report(['gempy', 'gempy_engine', 'numpy'])

--------------------------------------------------------------------------------
  Date: Fri Apr 19 04:41:48 2024 GMT

                OS : Linux
            CPU(s) : 16
           Machine : x86_64
      Architecture : 64bit
               RAM : 61.5 GiB
       Environment : Python

  Python 3.11.8 (main, Mar 12 2024, 11:52:02) [GCC 12.2.0]

             gempy : 2024.1.0
      gempy_engine : 2024.1.1
             numpy : 1.23.5
             scipy : 1.10.1
           IPython : 8.12.0
        matplotlib : 3.7.1
            scooby : 0.8.0
--------------------------------------------------------------------------------

Hierarchical modeling

Is your feature request related to a problem? Please describe.
Problem: different interpolation approaches may be required for different geological features on multiple scales, or simply different geological domains. This requires separating the entire modelling domain into sub-zones.

Describe the solution you'd like
Ideal: a high-level function/ class which allows to create a domain separation and a hierarchical definition of models.

Describe alternatives you've considered
Trying it all with one scalar field -> doesn't work...

Additional context
n/a

Add the option to have a range per scalar field

The default range depends now on the extent. This is useful because makes sure to cover the whole domain. However it can give instabilities when the range is too large in comparison to the input data.

Therefore, it is possible that the user wants to tweak the range per scalar field but by default probably it should still be the diagonal of the regular grid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.