[yt-dev] Region object API change

Matthew Turk matthewturk at gmail.com
Fri Jul 25 19:20:46 PDT 2014


-1. Too late in the cycle, but we can revisit (with compat layer) in the
future.
On Jul 25, 2014 8:40 PM, "Cameron Hummels" <chummels at gmail.com> wrote:

> As I'm writing up the objects documentation, I realize that we have some
> weirdness with our "region" object in that we require it to have a
> specified center, even though the only things which are really needed to
> specify a 3D box are the left corner and right corner.  I know in the past
> I've been perplexed by this additional center point requirement, and it
> might confuse others.  Since 3.0 is the time to break API, how do people
> feel about changing the constructor for the region object to just be:
>
> region(left corner, right corner)
>
> instead of the current constructor:
>
> region(center, left corner, right corner)
>
> ?
>
> I realize that this is right before the release, but it seems like if
> we're going to change it, now is the time to do it.  In fact, I was looking
> at ways to overload the region class with a wrapper so that we could just
> automatically accept 2 arguments and calculate the average of the left and
> right corners to pass to the 3-argument constructor.  But I couldn't seem
> to find a way to make this work.
>
> +/-1 on changing the region constructor?
>
> Cameron
>
> --
> Cameron Hummels
> Postdoctoral Researcher
> Steward Observatory
> University of Arizona
> http://chummels.org
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140725/1cded236/attachment.htm>


More information about the yt-dev mailing list