Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e191856e authored by MAZY Francois-Remi's avatar MAZY Francois-Remi
Browse files

new branch with numpy nd array objects as layers

parent c3cc43d8
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ save_data_on_exit = True ...@@ -4,7 +4,7 @@ save_data_on_exit = True
save_history = True save_history = True
save_non_project_files = False save_non_project_files = False
project_type = empty-project-type project_type = empty-project-type
recent_files = ['../clumpy-cases/simple_case/run_raw.py', 'clumpy/calibration/_calibrator.py', 'clumpy/_base/_land.py', 'clumpy/allocation/_allocator.py', 'clumpy/allocation/_unbiased.py', 'clumpy/allocation/_unbiased_mono_pixel.py', 'clumpy/feature_selection/_mRMR.py'] recent_files = ['../clumpy-cases/simple_case/run_raw.py', 'clumpy/calibration/_calibrator.py', 'clumpy/layer/_layer.py', 'clumpy/layer/_land_use_layer.py', 'clumpy/map/_land_use_map.py', 'clumpy/map/_map.py', 'clumpy/__init__.py', 'clumpy/map/__init__.py', 'requirements.txt']
[main] [main]
version = 0.2.0 version = 0.2.0
......
...@@ -4,7 +4,7 @@ save_data_on_exit = True ...@@ -4,7 +4,7 @@ save_data_on_exit = True
save_history = True save_history = True
save_non_project_files = False save_non_project_files = False
project_type = empty-project-type project_type = empty-project-type
recent_files = ['../clumpy-cases/simple_case/run_raw.py', 'clumpy/calibration/_calibrator.py', 'clumpy/layer/_layer.py', 'clumpy/layer/_land_use_layer.py', 'clumpy/map/_land_use_map.py', 'clumpy/map/_map.py', 'clumpy/__init__.py', 'clumpy/map/__init__.py'] recent_files = ['../clumpy-cases/simple_case/run_raw.py', 'clumpy/calibration/_calibrator.py', 'clumpy/layer/_layer.py', 'clumpy/layer/_land_use_layer.py', 'clumpy/map/_land_use_map.py', 'clumpy/map/_map.py', 'clumpy/__init__.py', 'clumpy/map/__init__.py', 'requirements.txt']
[main] [main]
version = 0.2.0 version = 0.2.0
......
...@@ -20,6 +20,9 @@ François-Rémi Mazy ...@@ -20,6 +20,9 @@ François-Rémi Mazy
*The software provided by pip is not up to date !* *The software provided by pip is not up to date !*
Create conda env
`conda create -n clumpy python=3.8 spyder gdal rasterio`
build the package : build the package :
`python3 setup.py sdist bdist_wheel` `python3 setup.py sdist bdist_wheel`
......
...@@ -13,20 +13,22 @@ logger = logging.getLogger('clumpy') ...@@ -13,20 +13,22 @@ logger = logging.getLogger('clumpy')
from ..tools._console import stop_log from ..tools._console import stop_log
class Layer: class Layer(np.ndarray):
"""Layer base element """Layer base element
""" """
def __new__(cls, input_array):
obj = np.asarray(input_array).view(cls)
return obj
def __init__(self, def __init__(self,
label=None, label=None,
time=0,
path=None, path=None,
data=None, data=None,
band_tags=None, band_tags=None,
copy_geo=None): copy_geo=None):
self.label = label self.label = label
self.time = time
self.path = path self.path = path
self.copy_geo = copy_geo self.copy_geo = copy_geo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment