gempy-project / gempy_engine Goto Github PK
View Code? Open in Web Editor NEWLicense: European Union Public License 1.2
License: European Union Public License 1.2
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
--------------------------------------------------------------------------------
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.