Parcourir la source

Fix normalization array from module

Jérôme BUISINE il y a 4 ans
Parent
commit
7b66621943
41 fichiers modifiés avec 78 ajouts et 82 suppressions
  1. BIN
      docs/build/doctrees/environment.pickle
  2. BIN
      docs/build/doctrees/ipfml/ipfml.utils.doctree
  3. 1 1
      docs/build/html/.buildinfo
  4. 2 2
      docs/build/html/_modules/index.html
  5. 2 2
      docs/build/html/_modules/ipfml/exceptions.html
  6. 2 2
      docs/build/html/_modules/ipfml/filters/convolution.html
  7. 2 2
      docs/build/html/_modules/ipfml/filters/kernels.html
  8. 2 2
      docs/build/html/_modules/ipfml/filters/noise.html
  9. 2 2
      docs/build/html/_modules/ipfml/iqa/fr.html
  10. 2 2
      docs/build/html/_modules/ipfml/metrics.html
  11. 2 2
      docs/build/html/_modules/ipfml/processing/compression.html
  12. 2 2
      docs/build/html/_modules/ipfml/processing/movement.html
  13. 2 2
      docs/build/html/_modules/ipfml/processing/reconstruction.html
  14. 2 2
      docs/build/html/_modules/ipfml/processing/segmentation.html
  15. 2 2
      docs/build/html/_modules/ipfml/processing/transform.html
  16. 5 7
      docs/build/html/_modules/ipfml/utils.html
  17. 1 1
      docs/build/html/_static/documentation_options.js
  18. 2 2
      docs/build/html/contributing.html
  19. 2 2
      docs/build/html/description.html
  20. 2 2
      docs/build/html/examples.html
  21. 2 2
      docs/build/html/genindex.html
  22. 2 2
      docs/build/html/index.html
  23. 2 2
      docs/build/html/ipfml.html
  24. 2 2
      docs/build/html/ipfml/ipfml.exceptions.html
  25. 2 2
      docs/build/html/ipfml/ipfml.filters.convolution.html
  26. 2 2
      docs/build/html/ipfml/ipfml.filters.kernels.html
  27. 2 2
      docs/build/html/ipfml/ipfml.filters.noise.html
  28. 2 2
      docs/build/html/ipfml/ipfml.iqa.fr.html
  29. 2 2
      docs/build/html/ipfml/ipfml.metrics.html
  30. 2 2
      docs/build/html/ipfml/ipfml.processing.compression.html
  31. 2 2
      docs/build/html/ipfml/ipfml.processing.movement.html
  32. 2 2
      docs/build/html/ipfml/ipfml.processing.reconstruction.html
  33. 2 2
      docs/build/html/ipfml/ipfml.processing.segmentation.html
  34. 2 2
      docs/build/html/ipfml/ipfml.processing.transform.html
  35. 3 3
      docs/build/html/ipfml/ipfml.utils.html
  36. BIN
      docs/build/html/objects.inv
  37. 2 2
      docs/build/html/py-modindex.html
  38. 2 2
      docs/build/html/search.html
  39. 2 2
      docs/source/conf.py
  40. 3 5
      ipfml/utils.py
  41. 1 1
      setup.py

BIN
docs/build/doctrees/environment.pickle


BIN
docs/build/doctrees/ipfml/ipfml.utils.doctree


+ 1 - 1
docs/build/html/.buildinfo

@@ -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: d19508e4af4ac33ff612fcffa601719d
+config: 6caa61d79723a7d62ecdb97776cf8275
 tags: 645f666f9bcd5a90fca523b33c5a78b7

+ 2 - 2
docs/build/html/_modules/index.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Overview: module code &mdash; ipfml v0.4.5 documentation</title>
+  <title>Overview: module code &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/exceptions.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.exceptions &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.exceptions &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/filters/convolution.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.convolution &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.filters.convolution &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/filters/kernels.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.kernels &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.filters.kernels &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/filters/noise.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.noise &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.filters.noise &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/iqa/fr.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.iqa.fr &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.iqa.fr &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/metrics.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.metrics &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.metrics &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/compression.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.compression &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.compression &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/movement.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.movement &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.movement &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/reconstruction.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/segmentation.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/_modules/ipfml/processing/transform.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.transform &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.transform &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 5 - 7
docs/build/html/_modules/ipfml/utils.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.utils &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.utils &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           
@@ -175,20 +175,18 @@
 
 <span class="sd">    &gt;&gt;&gt; from ipfml import utils</span>
 <span class="sd">    &gt;&gt;&gt; import numpy as np</span>
-<span class="sd">    &gt;&gt;&gt; arr = np.arange(11)</span>
+<span class="sd">    &gt;&gt;&gt; arr = np.arange(5)</span>
 <span class="sd">    &gt;&gt;&gt; arr_normalized = utils.normalize_arr(arr)</span>
 <span class="sd">    &gt;&gt;&gt; arr_normalized[1]</span>
 <span class="sd">    0.1</span>
 <span class="sd">    &quot;&quot;&quot;</span>
 
     <span class="n">output_arr</span> <span class="o">=</span> <span class="p">[]</span>
-    <span class="n">max_value</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
-    <span class="n">min_value</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
+    <span class="n">sum_value</span> <span class="o">=</span> <span class="nb">sum</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
 
     <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">arr</span><span class="p">:</span>
         <span class="c1"># add of epsilon value in order to avoid Zero Division</span>
-        <span class="n">output_arr</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
-            <span class="p">(</span><span class="n">v</span> <span class="o">-</span> <span class="n">min_value</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">max_value</span> <span class="o">-</span> <span class="n">min_value</span> <span class="o">+</span> <span class="n">sys</span><span class="o">.</span><span class="n">float_info</span><span class="o">.</span><span class="n">epsilon</span><span class="p">))</span>
+        <span class="n">output_arr</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">v</span> <span class="o">/</span> <span class="n">sum_value</span><span class="p">)</span>
 
     <span class="k">return</span> <span class="n">output_arr</span></div>
 

+ 1 - 1
docs/build/html/_static/documentation_options.js

@@ -1,6 +1,6 @@
 var DOCUMENTATION_OPTIONS = {
     URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
-    VERSION: 'v0.4.5',
+    VERSION: 'v0.4.6',
     LANGUAGE: 'None',
     COLLAPSE_INDEX: false,
     FILE_SUFFIX: '.html',

+ 2 - 2
docs/build/html/contributing.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Contributing &mdash; ipfml v0.4.5 documentation</title>
+  <title>Contributing &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -57,7 +57,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/description.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Description &mdash; ipfml v0.4.5 documentation</title>
+  <title>Description &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/examples.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Examples &mdash; ipfml v0.4.5 documentation</title>
+  <title>Examples &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/genindex.html

@@ -9,7 +9,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Index &mdash; ipfml v0.4.5 documentation</title>
+  <title>Index &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -57,7 +57,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/index.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Image Processing For Machine Learning &mdash; ipfml v0.4.5 documentation</title>
+  <title>Image Processing For Machine Learning &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -57,7 +57,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Documentation &mdash; ipfml v0.4.5 documentation</title>
+  <title>Documentation &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.exceptions.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.exceptions &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.exceptions &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.filters.convolution.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.convolution &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.filters.convolution &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.filters.kernels.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.kernels &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.filters.kernels &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.filters.noise.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.filters.noise &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.filters.noise &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.iqa.fr.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.iqa.fr &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.iqa.fr &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.metrics.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.metrics &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.metrics &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.compression.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.compression &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.compression &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.movement.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.movement &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.movement &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.reconstruction.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.reconstruction &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.segmentation.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.segmentation &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/ipfml/ipfml.processing.transform.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.processing.transform &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.processing.transform &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 3 - 3
docs/build/html/ipfml/ipfml.utils.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>ipfml.utils &mdash; ipfml v0.4.5 documentation</title>
+  <title>ipfml.utils &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -58,7 +58,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           
@@ -455,7 +455,7 @@
 <p>Example:</p>
 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">ipfml</span> <span class="k">import</span> <span class="n">utils</span>
 <span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
-<span class="gp">&gt;&gt;&gt; </span><span class="n">arr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">11</span><span class="p">)</span>
+<span class="gp">&gt;&gt;&gt; </span><span class="n">arr</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span>
 <span class="gp">&gt;&gt;&gt; </span><span class="n">arr_normalized</span> <span class="o">=</span> <span class="n">utils</span><span class="o">.</span><span class="n">normalize_arr</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
 <span class="gp">&gt;&gt;&gt; </span><span class="n">arr_normalized</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
 <span class="go">0.1</span>

BIN
docs/build/html/objects.inv


+ 2 - 2
docs/build/html/py-modindex.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Python Module Index &mdash; ipfml v0.4.5 documentation</title>
+  <title>Python Module Index &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -59,7 +59,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/build/html/search.html

@@ -8,7 +8,7 @@
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
-  <title>Search &mdash; ipfml v0.4.5 documentation</title>
+  <title>Search &mdash; ipfml v0.4.6 documentation</title>
   
 
   
@@ -56,7 +56,7 @@
             
             
               <div class="version">
-                0.4.5
+                0.4.6
               </div>
             
           

+ 2 - 2
docs/source/conf.py

@@ -24,9 +24,9 @@ copyright = '2019, Jérôme BUISINE'
 author = 'Jérôme BUISINE'
 
 # The short X.Y version
-version = '0.4.5'
+version = '0.4.6'
 # The full version, including alpha/beta/rc tags
-release = 'v0.4.5'
+release = 'v0.4.6'
 
 
 # -- General configuration ---------------------------------------------------

+ 3 - 5
ipfml/utils.py

@@ -24,20 +24,18 @@ def normalize_arr(arr):
 
     >>> from ipfml import utils
     >>> import numpy as np
-    >>> arr = np.arange(11)
+    >>> arr = np.arange(5)
     >>> arr_normalized = utils.normalize_arr(arr)
     >>> arr_normalized[1]
     0.1
     """
 
     output_arr = []
-    max_value = max(arr)
-    min_value = min(arr)
+    sum_value = sum(arr)
 
     for v in arr:
         # add of epsilon value in order to avoid Zero Division
-        output_arr.append(
-            (v - min_value) / (max_value - min_value + sys.float_info.epsilon))
+        output_arr.append(v / sum_value)
 
     return output_arr
 

+ 1 - 1
setup.py

@@ -63,7 +63,7 @@ class BuildTestCommand(setuptools.command.build_py.build_py):
 
 setup(
     name='ipfml',
-    version='0.4.5',
+    version='0.4.6',
     description='Image Processing For Machine Learning',
     long_description=readme(),
     classifiers=[