Commit 3caa7bf2 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Replaced deprecated 'source activate' with 'conda activate'.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 33ea8511
Pipeline #15079 passed with stages
in 8 minutes and 11 seconds
......@@ -49,7 +49,7 @@ test_specclassify_install:
# - conda update -c conda-forge python
- conda create -y -q --name specclassify_testinstall python=3
- source activate specclassify_testinstall
- conda activate specclassify_testinstall
# resolve some requirements with conda
- conda install --yes -q -c conda-forge numpy gdal scikit-image matplotlib pyproj shapely geopandas
......
......@@ -29,7 +29,9 @@ import numpy as np
def calc_sam(s1_norm, s2_norm, axis=0):
"""Compute spectral angle between two vectors or images (in radians)."""
upper = np.sum(s1_norm * s2_norm, axis=axis)
lower = np.sqrt(np.sum(s1_norm * s1_norm, axis=axis)) * np.sqrt(np.sum(s2_norm * s2_norm, axis=axis))
lower = \
np.sqrt(np.sum(s1_norm * s1_norm, axis=axis)) * \
np.sqrt(np.sum(s2_norm * s2_norm, axis=axis))
if isinstance(lower, np.ndarray):
lower[lower == 0] = 1e-10
......
......@@ -7,5 +7,5 @@ COPY *.yml /root/
RUN /bin/bash -i -c "\
source /root/miniconda3/bin/activate ; \
conda update -n base -c conda-forge conda;\
source activate ci_env; \
conda activate ci_env; \
conda env update -n ci_env -f /root/environment_specclassify.yml"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment