Skip to content

Commit

Permalink
Merge pull request #419 from DataverseLabs/dev
Browse files Browse the repository at this point in the history
0.5.1 update
  • Loading branch information
SimonMolinsky authored Feb 19, 2024
2 parents 3f9ecf4 + ff6ce4e commit 4773c76
Show file tree
Hide file tree
Showing 178 changed files with 3,515 additions and 2,597 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Pyinterpolate

**version 0.5** - *Mykolaiv*
**version 0.5.1** - *Mykolaiv*

---

Expand Down
10 changes: 10 additions & 0 deletions changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Pyinterpolate is the Python library for **geostatistics** and **spatial statisti
Changes by date
===============

2024-02-19
----------

**version 0.5.1** (*pre production development*)

* (enhancement) `interpolate_raster()` function takes `allow_approx_solutions` parameter, and it protects from `LinAlgError` that might occur if interpolation points are duplicated (due to the floating point number representation).
* (refactoring) `calc_point_to_point_distance` function refactored to `point_distance`, changed input parameters' schema,
* (refactoring) new selection method for unequally spaced bins: `select_values_between_lags`
* (debug) `np.float` type casting has been changed to `float`

2023-09-16
----------

Expand Down
2 changes: 1 addition & 1 deletion developer/dev_checks/debug_sandbox/check_cent_pk/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def centroid_poisson_kriging(semivariogram_model: TheoreticalVariogram,

# Distances between known blocks
coordinates = kriging_data[:, :values_column_index]
block_distances = calc_point_to_point_distance(coordinates).flatten()
block_distances = point_distance(coordinates, coordinates).flatten()
known_blocks_semivars = semivariogram_model.predict(block_distances)
predicted = np.array(known_blocks_semivars.reshape(n, n))
predicted = sem_to_cov(predicted, sill)
Expand Down
Binary file modified docs/build/doctrees/api/api.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/datatypes/core.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/distance/distance.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/idw/idw.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/io/io.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/kriging/block/block_kriging.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/api/kriging/kriging.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/kriging/point/point_kriging.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/pipelines/data/download.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/api/pipelines/pipelines.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/validation/validation.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/variogram/block/block.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/api/variogram/indicator/indicator.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/api/variogram/variogram.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/api/viz/viz.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/community/community.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/community/doc_parts/contributors.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/community/doc_parts/forum.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/community/doc_parts/use_cases.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/developer/dev.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/developer/doc_parts/bugs.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/developer/doc_parts/development.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/developer/doc_parts/package.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/developer/doc_parts/reqs.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/science/biblio.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/science/cite.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/setup/setup.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/usage/good_practices.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/usage/learning_materials.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/usage/quickstart.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/usage/tutorials.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: f4fcac24d7e2622fd34b98aa8fa53241
config: 547607724c14a157e2d2e282259579a3
tags: 645f666f9bcd5a90fca523b33c5a78b7
27 changes: 16 additions & 11 deletions docs/build/html/_modules/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


<!DOCTYPE html>


Expand All @@ -7,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; Pyinterpolate 0.5.0 documentation</title>
<title>Overview: module code &#8212; Pyinterpolate 0.5.1 documentation</title>



Expand All @@ -27,18 +28,21 @@
<link rel="preload" as="font" type="font/woff2" crossorigin href="../_static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2" />
<link rel="preload" as="font" type="font/woff2" crossorigin href="../_static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2" />

<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=a746c00c" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />

<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="../_static/scripts/bootstrap.js?digest=e353d410970836974a52" />
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=e353d410970836974a52" />

<script src="../_static/documentation_options.js?v=70f82a29"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../_static/copybutton.js?v=f281be69"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script>DOCUMENTATION_OPTIONS.pagename = '_modules/index';</script>
<link rel="index" title="Index" href="../genindex.html" />
Expand Down Expand Up @@ -104,7 +108,7 @@



<p class="title logo__title">Pyinterpolate 0.5.0 documentation</p>
<p class="title logo__title">Pyinterpolate 0.5.1 documentation</p>

</a></div>

Expand Down Expand Up @@ -413,6 +417,7 @@
<h1>All modules for which code is available</h1>
<ul><li><a href="pyinterpolate/distance/distance.html">pyinterpolate.distance.distance</a></li>
<li><a href="pyinterpolate/distance/gridding.html">pyinterpolate.distance.gridding</a></li>
<li><a href="pyinterpolate/distance/point.html">pyinterpolate.distance.point</a></li>
<li><a href="pyinterpolate/idw/idw.html">pyinterpolate.idw.idw</a></li>
<li><a href="pyinterpolate/io/read_data.html">pyinterpolate.io.read_data</a></li>
<li><a href="pyinterpolate/kriging/models/block/area_to_area_poisson_kriging.html">pyinterpolate.kriging.models.block.area_to_area_poisson_kriging</a></li>
Expand Down Expand Up @@ -477,15 +482,15 @@ <h1>All modules for which code is available</h1>
<div class="footer-item">
<p class="copyright">

© Copyright 2023, Szymon Moliński.
© Copyright 2024, Szymon Moliński.
<br/>

</p>
</div>

<div class="footer-item">
<p class="sphinx-version">
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
<br/>
</p>
</div>
Expand Down
18 changes: 14 additions & 4 deletions docs/build/html/_modules/pyinterpolate/distance/distance.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyinterpolate.distance.distance &#8212; Pyinterpolate 0.4.1 documentation</title>
<title>pyinterpolate.distance.distance &#8212; Pyinterpolate 0.5.1 documentation</title>



Expand Down Expand Up @@ -108,7 +108,7 @@



<p class="title logo__title">Pyinterpolate 0.4.1 documentation</p>
<p class="title logo__title">Pyinterpolate 0.5.1 documentation</p>

</a></div>

Expand Down Expand Up @@ -424,6 +424,8 @@ <h1>Source code for pyinterpolate.distance.distance</h1><div class="highlight"><
<span class="sd">Authors</span>
<span class="sd">-------</span>
<span class="sd">1. Szymon Moliński | @SimonMolinsky</span>

<span class="sd">TODO: the file will be removed in version 1.0</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Iterable</span>
Expand All @@ -438,6 +440,8 @@ <h1>Source code for pyinterpolate.distance.distance</h1><div class="highlight"><
<span class="kn">from</span> <span class="nn">pyinterpolate.processing.preprocessing.blocks</span> <span class="kn">import</span> <span class="n">PointSupport</span>
<span class="kn">from</span> <span class="nn">pyinterpolate.processing.transform.transform</span> <span class="kn">import</span> <span class="n">point_support_to_dict</span><span class="p">,</span> <span class="n">block_dataframe_to_dict</span>

<span class="kn">from</span> <span class="nn">deprecation</span> <span class="kn">import</span> <span class="n">deprecated</span>


<span class="k">def</span> <span class="nf">_calc_b2b_dist_from_array</span><span class="p">(</span><span class="n">blocks</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Dict</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Function calculates distances between blocks.</span>
Expand Down Expand Up @@ -725,7 +729,13 @@ <h1>Source code for pyinterpolate.distance.distance</h1><div class="highlight"><
<span class="k">return</span> <span class="n">angles</span>


<div class="viewcode-block" id="calc_point_to_point_distance"><a class="viewcode-back" href="../../../api/distance/distance.html#pyinterpolate.calc_point_to_point_distance">[docs]</a><span class="k">def</span> <span class="nf">calc_point_to_point_distance</span><span class="p">(</span><span class="n">points_a</span><span class="p">,</span> <span class="n">points_b</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<div class="viewcode-block" id="calc_point_to_point_distance"><a class="viewcode-back" href="../../../api/distance/distance.html#pyinterpolate.calc_point_to_point_distance">[docs]</a><span class="nd">@deprecated</span><span class="p">(</span>
<span class="n">deprecated_in</span><span class="o">=</span><span class="s1">&#39;0.5.1&#39;</span><span class="p">,</span>
<span class="n">removed_in</span><span class="o">=</span><span class="s1">&#39;1.0&#39;</span><span class="p">,</span>
<span class="n">current_version</span><span class="o">=</span><span class="s1">&#39;0.5.1&#39;</span><span class="p">,</span>
<span class="n">details</span><span class="o">=</span><span class="s2">&quot;Use `point_distance()` instead&quot;</span>
<span class="p">)</span>
<span class="k">def</span> <span class="nf">calc_point_to_point_distance</span><span class="p">(</span><span class="n">points_a</span><span class="p">,</span> <span class="n">points_b</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Function calculates distances between two group of points of a single group to itself.</span>

<span class="sd"> Parameters</span>
Expand Down Expand Up @@ -825,7 +835,7 @@ <h1>Source code for pyinterpolate.distance.distance</h1><div class="highlight"><
<div class="footer-item">
<p class="copyright">

© Copyright 2023, Szymon Moliński.
© Copyright 2024, Szymon Moliński.
<br/>

</p>
Expand Down
Loading

0 comments on commit 4773c76

Please sign in to comment.