Skip to content

Commit

Permalink
Tests updated and OK
Browse files Browse the repository at this point in the history
  • Loading branch information
davemlz committed Feb 9, 2021
1 parent e5c32a7 commit 220531b
Show file tree
Hide file tree
Showing 38 changed files with 67 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .ipynb_checkpoints/README-checkpoint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The following features are extended through eemont:
point = ee.Geometry.Point([-76.21, 3.45]) # Example ROI
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, \|\, <, <=, ==, !=, >, >=, -, ~):
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, \|\, <, <=, ==, !=, >, >=, -, ~):

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The following features are extended through eemont:
point = ee.Geometry.Point([-76.21, 3.45]) # Example ROI
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, \|\, <, <=, ==, !=, >, >=, -, ~):
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, \|\, <, <=, ==, !=, >, >=, -, ~):

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/.ipynb_checkpoints/changelog-checkpoint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ New Features
~~~~~~~~~~~~~~~~~~~~~~

- The :code:`toEEFeatureCollection()` extended method for pd.DataFrame classes was created.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, |) were overloaded for ee.Image objects.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, |) were overloaded for ee.Image objects.
- The rich comparisons (<, <=, ==, !=, >, >=) were overloaded for ee.Image objects.
- The unary operators (-, ~) were overloaded for ee.Image objects.
Expand Down
2 changes: 1 addition & 1 deletion docs/.ipynb_checkpoints/index-checkpoint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The following features are extended through eemont:
point = ee.Geometry.Point([-76.21, 3.45]) # Example ROI
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, \|\, <, <=, ==, !=, >, >=, -, ~):
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, \|\, <, <=, ==, !=, >, >=, -, ~):

.. code-block:: python
Expand Down
Binary file not shown.
Binary file modified docs/_build/doctrees/.ipynb_checkpoints/index-checkpoint.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/changelog.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file modified docs/_build/doctrees/guide/overloadedOperators.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h3>New Modules<a class="headerlink" href="#new-modules" title="Permalink to thi
<h3>New Features<a class="headerlink" href="#new-features" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p>The <code class="code docutils literal notranslate"><span class="pre">toEEFeatureCollection()</span></code> extended method for pd.DataFrame classes was created.</p></li>
<li><p>The binary operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, ^, <a href="#id1"><span class="problematic" id="id2">|</span></a>) were overloaded for ee.Image objects.</p></li>
<li><p>The binary operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, <a href="#id1"><span class="problematic" id="id2">|</span></a>) were overloaded for ee.Image objects.</p></li>
<li><p>The rich comparisons (&lt;, &lt;=, ==, !=, &gt;, &gt;=) were overloaded for ee.Image objects.</p></li>
<li><p>The unary operators (-, ~) were overloaded for ee.Image objects.</p></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/.ipynb_checkpoints/index-checkpoint.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ <h2>Features<a class="headerlink" href="#features" title="Permalink to this head
</pre></div>
</div>
<ul class="simple">
<li><p>Overloaded operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, ^, |, &lt;, &lt;=, ==, !=, &gt;, &gt;=, -, ~):</p></li>
<li><p>Overloaded operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, |, &lt;, &lt;=, ==, !=, &gt;, &gt;=, -, ~):</p></li>
</ul>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">S2</span> <span class="o">=</span> <span class="p">(</span><span class="n">ee</span><span class="o">.</span><span class="n">ImageCollection</span><span class="p">(</span><span class="s1">&#39;COPERNICUS/S2_SR&#39;</span><span class="p">)</span>
<span class="o">.</span><span class="n">filterBounds</span><span class="p">(</span><span class="n">point</span><span class="p">)</span>
Expand Down
40 changes: 2 additions & 38 deletions docs/_build/html/_modules/eemont/image.html
Original file line number Diff line number Diff line change
Expand Up @@ -538,42 +538,6 @@ <h1>Source code for eemont.image</h1><div class="highlight"><pre>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">return</span> <span class="n">ee</span><span class="o">.</span><span class="n">Image</span><span class="p">(</span><span class="n">other</span><span class="p">)</span><span class="o">.</span><span class="n">And</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>

<span class="nd">@_extend_eeImage</span><span class="p">()</span>
<span class="k">def</span> <span class="fm">__xor__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Computes the binary operator XOR between two images.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> self : ee.Image</span>
<span class="sd"> Left operand.</span>
<span class="sd"> other : ee.Image | numeric | list[numeric]</span>
<span class="sd"> Right operand. If numeric, an ee.Image is created from its value. If list, an ee.Image with n bands (n = len(list)) is created from its values.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> ee.Image</span>
<span class="sd"> Binary operator XOR.</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">Xor</span><span class="p">(</span><span class="n">other</span><span class="p">)</span>

<span class="nd">@_extend_eeImage</span><span class="p">()</span>
<span class="k">def</span> <span class="fm">__rxor__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Computes the binary operator XOR between two images.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> self : ee.Image</span>
<span class="sd"> Right operand.</span>
<span class="sd"> other : ee.Image | numeric | list[numeric]</span>
<span class="sd"> Left operand. If numeric, an ee.Image is created from its value. If list, an ee.Image with n bands (n = len(list)) is created from its values.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> ee.Image</span>
<span class="sd"> Binary operator XOR.</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">return</span> <span class="n">ee</span><span class="o">.</span><span class="n">Image</span><span class="p">(</span><span class="n">other</span><span class="p">)</span><span class="o">.</span><span class="n">Xor</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>

<span class="nd">@_extend_eeImage</span><span class="p">()</span>
<span class="k">def</span> <span class="fm">__or__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Computes the binary operator OR between two images.</span>
Expand Down Expand Up @@ -719,7 +683,7 @@ <h1>Source code for eemont.image</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">gte</span><span class="p">(</span><span class="n">other</span><span class="p">)</span>

<span class="nd">@_extend_eeImage</span><span class="p">()</span>
<span class="k">def</span> <span class="fm">__neg__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__neg__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Computes the unary operator NEGATIVE on an image.</span>

<span class="sd"> Parameters</span>
Expand All @@ -735,7 +699,7 @@ <h1>Source code for eemont.image</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">multiply</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>

<span class="nd">@_extend_eeImage</span><span class="p">()</span>
<span class="k">def</span> <span class="fm">__invert__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__invert__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Computes the unary operator NOT on an image.</span>

<span class="sd"> Parameters</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ New Features
~~~~~~~~~~~~~~~~~~~~~~

- The :code:`toEEFeatureCollection()` extended method for pd.DataFrame classes was created.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, |) were overloaded for ee.Image objects.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, |) were overloaded for ee.Image objects.
- The rich comparisons (<, <=, ==, !=, >, >=) were overloaded for ee.Image objects.
- The unary operators (-, ~) were overloaded for ee.Image objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The following features are extended through eemont:
point = ee.Geometry.Point([-76.21, 3.45]) # Example ROI
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, \|\, <, <=, ==, !=, >, >=, -, ~):
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, \|\, <, <=, ==, !=, >, >=, -, ~):

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_sources/changelog.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ New Features
~~~~~~~~~~~~~~~~~~~~~~

- The :code:`toEEFeatureCollection()` extended method for pd.DataFrame classes was created.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, |) were overloaded for ee.Image objects.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, |) were overloaded for ee.Image objects.
- The rich comparisons (<, <=, ==, !=, >, >=) were overloaded for ee.Image objects.
- The unary operators (-, ~) were overloaded for ee.Image objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ The following table shows the list of binary operators that are overloaded:
* - And
- Image1.And(Image2)
- Image1 & Image2
* - Xor
- Image1.Xor(Image2)
- Image1 ^ Image2
* - Or
- Image1.Or(Image2)
- Image1 | Image2
Expand Down
3 changes: 0 additions & 3 deletions docs/_build/html/_sources/guide/overloadedOperators.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ The following table shows the list of binary operators that are overloaded:
* - And
- Image1.And(Image2)
- Image1 & Image2
* - Xor
- Image1.Xor(Image2)
- Image1 ^ Image2
* - Or
- Image1.Or(Image2)
- Image1 | Image2
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The following features are extended through eemont:
point = ee.Geometry.Point([-76.21, 3.45]) # Example ROI
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, \|\, <, <=, ==, !=, >, >=, -, ~):
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, \|\, <, <=, ==, !=, >, >=, -, ~):

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ <h3>New Modules<a class="headerlink" href="#new-modules" title="Permalink to thi
<h3>New Features<a class="headerlink" href="#new-features" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p>The <code class="code docutils literal notranslate"><span class="pre">toEEFeatureCollection()</span></code> extended method for pd.DataFrame classes was created.</p></li>
<li><p>The binary operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, ^, <a href="#id1"><span class="problematic" id="id2">|</span></a>) were overloaded for ee.Image objects.</p></li>
<li><p>The binary operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, <a href="#id1"><span class="problematic" id="id2">|</span></a>) were overloaded for ee.Image objects.</p></li>
<li><p>The rich comparisons (&lt;, &lt;=, ==, !=, &gt;, &gt;=) were overloaded for ee.Image objects.</p></li>
<li><p>The unary operators (-, ~) were overloaded for ee.Image objects.</p></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,7 @@ <h3>Binary Operators<a class="headerlink" href="#binary-operators" title="Permal
<td><p>Image1.And(Image2)</p></td>
<td><p>Image1 &amp; Image2</p></td>
</tr>
<tr class="row-even"><td><p>Xor</p></td>
<td><p>Image1.Xor(Image2)</p></td>
<td><p>Image1 ^ Image2</p></td>
</tr>
<tr class="row-odd"><td><p>Or</p></td>
<tr class="row-even"><td><p>Or</p></td>
<td><p>Image1.Or(Image2)</p></td>
<td><p>Image1 | Image2</p></td>
</tr>
Expand Down
6 changes: 1 addition & 5 deletions docs/_build/html/guide/overloadedOperators.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,7 @@ <h3>Binary Operators<a class="headerlink" href="#binary-operators" title="Permal
<td><p>Image1.And(Image2)</p></td>
<td><p>Image1 &amp; Image2</p></td>
</tr>
<tr class="row-even"><td><p>Xor</p></td>
<td><p>Image1.Xor(Image2)</p></td>
<td><p>Image1 ^ Image2</p></td>
</tr>
<tr class="row-odd"><td><p>Or</p></td>
<tr class="row-even"><td><p>Or</p></td>
<td><p>Image1.Or(Image2)</p></td>
<td><p>Image1 | Image2</p></td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/_build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ <h2>Features<a class="headerlink" href="#features" title="Permalink to this head
</pre></div>
</div>
<ul class="simple">
<li><p>Overloaded operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, ^, |, &lt;, &lt;=, ==, !=, &gt;, &gt;=, -, ~):</p></li>
<li><p>Overloaded operators (+, -, *, /, //, %, **, &lt;&lt;, &gt;&gt;, &amp;, |, &lt;, &lt;=, ==, !=, &gt;, &gt;=, -, ~):</p></li>
</ul>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">S2</span> <span class="o">=</span> <span class="p">(</span><span class="n">ee</span><span class="o">.</span><span class="n">ImageCollection</span><span class="p">(</span><span class="s1">&#39;COPERNICUS/S2_SR&#39;</span><span class="p">)</span>
<span class="o">.</span><span class="n">filterBounds</span><span class="p">(</span><span class="n">point</span><span class="p">)</span>
Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ New Features
~~~~~~~~~~~~~~~~~~~~~~

- The :code:`toEEFeatureCollection()` extended method for pd.DataFrame classes was created.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, |) were overloaded for ee.Image objects.
- The binary operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, |) were overloaded for ee.Image objects.
- The rich comparisons (<, <=, ==, !=, >, >=) were overloaded for ee.Image objects.
- The unary operators (-, ~) were overloaded for ee.Image objects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ The following table shows the list of binary operators that are overloaded:
* - And
- Image1.And(Image2)
- Image1 & Image2
* - Xor
- Image1.Xor(Image2)
- Image1 ^ Image2
* - Or
- Image1.Or(Image2)
- Image1 | Image2
Expand Down
3 changes: 0 additions & 3 deletions docs/guide/overloadedOperators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ The following table shows the list of binary operators that are overloaded:
* - And
- Image1.And(Image2)
- Image1 & Image2
* - Xor
- Image1.Xor(Image2)
- Image1 ^ Image2
* - Or
- Image1.Or(Image2)
- Image1 | Image2
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The following features are extended through eemont:
point = ee.Geometry.Point([-76.21, 3.45]) # Example ROI
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, ^, \|\, <, <=, ==, !=, >, >=, -, ~):
- Overloaded operators (+, -, \*\, /, //, %, \**\ , <<, >>, &, \|\, <, <=, ==, !=, >, >=, -, ~):

.. code-block:: python
Expand Down
40 changes: 2 additions & 38 deletions eemont/.ipynb_checkpoints/image-checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,42 +369,6 @@ def __rand__(self, other):
'''
return ee.Image(other).And(self)

@_extend_eeImage()
def __xor__(self, other):
'''Computes the binary operator XOR between two images.
Parameters
----------
self : ee.Image
Left operand.
other : ee.Image | numeric | list[numeric]
Right operand. If numeric, an ee.Image is created from its value. If list, an ee.Image with n bands (n = len(list)) is created from its values.
Returns
-------
ee.Image
Binary operator XOR.
'''
return self.Xor(other)

@_extend_eeImage()
def __rxor__(self, other):
'''Computes the binary operator XOR between two images.
Parameters
----------
self : ee.Image
Right operand.
other : ee.Image | numeric | list[numeric]
Left operand. If numeric, an ee.Image is created from its value. If list, an ee.Image with n bands (n = len(list)) is created from its values.
Returns
-------
ee.Image
Binary operator XOR.
'''
return ee.Image(other).Xor(self)

@_extend_eeImage()
def __or__(self, other):
'''Computes the binary operator OR between two images.
Expand Down Expand Up @@ -550,7 +514,7 @@ def __ge__(self, other):
return self.gte(other)

@_extend_eeImage()
def __neg__(self, other):
def __neg__(self):
'''Computes the unary operator NEGATIVE on an image.
Parameters
Expand All @@ -566,7 +530,7 @@ def __neg__(self, other):
return self.multiply(-1)

@_extend_eeImage()
def __invert__(self, other):
def __invert__(self):
'''Computes the unary operator NOT on an image.
Parameters
Expand Down
40 changes: 2 additions & 38 deletions eemont/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,42 +369,6 @@ def __rand__(self, other):
'''
return ee.Image(other).And(self)

@_extend_eeImage()
def __xor__(self, other):
'''Computes the binary operator XOR between two images.
Parameters
----------
self : ee.Image
Left operand.
other : ee.Image | numeric | list[numeric]
Right operand. If numeric, an ee.Image is created from its value. If list, an ee.Image with n bands (n = len(list)) is created from its values.
Returns
-------
ee.Image
Binary operator XOR.
'''
return self.Xor(other)

@_extend_eeImage()
def __rxor__(self, other):
'''Computes the binary operator XOR between two images.
Parameters
----------
self : ee.Image
Right operand.
other : ee.Image | numeric | list[numeric]
Left operand. If numeric, an ee.Image is created from its value. If list, an ee.Image with n bands (n = len(list)) is created from its values.
Returns
-------
ee.Image
Binary operator XOR.
'''
return ee.Image(other).Xor(self)

@_extend_eeImage()
def __or__(self, other):
'''Computes the binary operator OR between two images.
Expand Down Expand Up @@ -550,7 +514,7 @@ def __ge__(self, other):
return self.gte(other)

@_extend_eeImage()
def __neg__(self, other):
def __neg__(self):
'''Computes the unary operator NEGATIVE on an image.
Parameters
Expand All @@ -566,7 +530,7 @@ def __neg__(self, other):
return self.multiply(-1)

@_extend_eeImage()
def __invert__(self, other):
def __invert__(self):
'''Computes the unary operator NOT on an image.
Parameters
Expand Down
Loading

0 comments on commit 220531b

Please sign in to comment.