You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@climate.apache.org by Alex Goodman <al...@colostate.edu> on 2013/06/08 02:42:10 UTC

Review Request: Small update to misc.py for improving performance in metrics.py

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11743/
-----------------------------------------------------------

Review request for Apache Open Climate.


Description
-------

In preparation for the performance tweaks I will make to metrics.py, I have added a helper function called reshapeMonthlyData() to rcmes/utils/misc.py that does the reshaping trick I mentioned earlier for monthly data. I also made it work for arrays with different dimensions (eg 1d and 3d) which will should help clean up the code considerably. 

An example of how it would be used has been attached in benchmark_metrics.py 


Diffs
-----

  http://svn.apache.org/repos/asf/incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py 1485875 

Diff: https://reviews.apache.org/r/11743/diff/


Testing
-------

-Works for arrays with arbitrary dimensions as long as the first dimension is a multiple of 12
-Maintains original shape of input array


Thanks,

Alex Goodman


Re: Review Request: Small update to misc.py for improving performance in metrics.py

Posted by Chris Mattmann <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11743/#review21625
-----------------------------------------------------------

Ship it!


Ship It!

- Chris Mattmann


On June 8, 2013, 12:42 a.m., Alex Goodman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11743/
> -----------------------------------------------------------
> 
> (Updated June 8, 2013, 12:42 a.m.)
> 
> 
> Review request for Apache Open Climate.
> 
> 
> Description
> -------
> 
> In preparation for the performance tweaks I will make to metrics.py, I have added a helper function called reshapeMonthlyData() to rcmes/utils/misc.py that does the reshaping trick I mentioned earlier for monthly data. I also made it work for arrays with different dimensions (eg 1d and 3d) which will should help clean up the code considerably. 
> 
> An example of how it would be used has been attached in benchmark_metrics.py 
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py 1485875 
> 
> Diff: https://reviews.apache.org/r/11743/diff/
> 
> 
> Testing
> -------
> 
> -Works for arrays with arbitrary dimensions as long as the first dimension is a multiple of 12
> -Maintains original shape of input array
> 
> 
> Thanks,
> 
> Alex Goodman
> 
>


Re: Review Request: Small update to misc.py for improving performance in metrics.py

Posted by Cameron Goodale <go...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11743/#review21794
-----------------------------------------------------------

Ship it!


Ship It!

- Cameron Goodale


On June 10, 2013, 5:49 p.m., Alex Goodman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11743/
> -----------------------------------------------------------
> 
> (Updated June 10, 2013, 5:49 p.m.)
> 
> 
> Review request for Apache Open Climate.
> 
> 
> Description
> -------
> 
> In preparation for the performance tweaks I will make to metrics.py, I have added a helper function called reshapeMonthlyData() to rcmes/utils/misc.py that does the reshaping trick I mentioned earlier for monthly data. I also made it work for arrays with different dimensions (eg 1d and 3d) which will should help clean up the code considerably. 
> 
> An example of how it would be used has been attached in benchmark_metrics.py 
> 
> 
> Diffs
> -----
> 
>   http://svn.apache.org/repos/asf/incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py 1490884 
> 
> Diff: https://reviews.apache.org/r/11743/diff/
> 
> 
> Testing
> -------
> 
> -Works for arrays with arbitrary dimensions as long as the first dimension is a multiple of 12
> -Maintains original shape of input array
> 
> 
> Thanks,
> 
> Alex Goodman
> 
>


Re: Review Request: Small update to misc.py for improving performance in metrics.py

Posted by Alex Goodman <go...@jpl.nasa.gov>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11743/
-----------------------------------------------------------

(Updated June 10, 2013, 5:49 p.m.)


Review request for Apache Open Climate.


Changes
-------

Kyo posted a comment on JIRA suggesting that I use the resize() method instead of directly changing the shape since it would not affect performance and is easier for some people to understand.


Description
-------

In preparation for the performance tweaks I will make to metrics.py, I have added a helper function called reshapeMonthlyData() to rcmes/utils/misc.py that does the reshaping trick I mentioned earlier for monthly data. I also made it work for arrays with different dimensions (eg 1d and 3d) which will should help clean up the code considerably. 

An example of how it would be used has been attached in benchmark_metrics.py 


Diffs (updated)
-----

  http://svn.apache.org/repos/asf/incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py 1490884 

Diff: https://reviews.apache.org/r/11743/diff/


Testing
-------

-Works for arrays with arbitrary dimensions as long as the first dimension is a multiple of 12
-Maintains original shape of input array


Thanks,

Alex Goodman