<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Yuan,<div class=""><br class=""></div><div class="">Unfortunately I can not reproduce this error with either yt 2.6 or yt 3… If you did not mind, could you provide your script and dataset (or send me offline) so I can take a quick look at it?</div><div class=""><br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Best wishes,</div><div class="">--</div><div class="">Suoqing JI</div><div class="">Ph.D Candidate</div><div class="">Department of Physics</div><div class="">University of California, Santa Barbara</div><div class=""><a href="http://web.physics.ucsb.edu/~suoqing" class="">http://web.physics.ucsb.edu/~suoqing</a></div></div></div></div></div></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jul 20, 2015, at 2:29 PM, Yuan Li <<a href="mailto:bear0980@gmail.com" class="">bear0980@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Suoqing,<br class=""><br class="">I added validators=[ValidateSpatial(1, ["Pressure"])]<br class=""><br class="">Now the error message is<br class="">ValueError: could not broadcast input array from shape (64,64,66) into shape (64,64,64)<div class=""><br class=""></div><div class="">Yuan</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Jul 19, 2015 at 6:25 PM, Suoqing Ji <span dir="ltr" class=""><<a href="mailto:suoqing@physics.ucsb.edu" target="_blank" class="">suoqing@physics.ucsb.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hi Yuan,<div class=""><br class=""></div><div class="">Just to check, have you included the “ValidateSpatial" object when adding the field? See the definition of DivV field: <a href="http://yt-project.org/docs/2.6/analyzing/creating_derived_fields.html#some-more-complicated-examples" target="_blank" class="">http://yt-project.org/docs/2.6/analyzing/creating_derived_fields.html#some-more-complicated-examples</a></div><div class=""><br class=""></div><div class=""><div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class=""><div class="">Best wishes,</div><div class="">--</div><div class="">Suoqing JI</div><div class="">Ph.D Candidate</div><div class="">Department of Physics</div><div class="">University of California, Santa Barbara</div><div class=""><a href="http://web.physics.ucsb.edu/~suoqing" target="_blank" class="">http://web.physics.ucsb.edu/~suoqing</a></div></div></div></div></div></div></div></div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Jul 19, 2015, at 2:52 PM, Yuan Li <<a href="mailto:yuan@astro.columbia.edu" target="_blank" class="">yuan@astro.columbia.edu</a>> wrote:</div><br class=""></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class="">Dear all,<div class=""><br class=""></div><div class=""><span style="font-size:13px" class="">I am using yt2.6. I was trying to define a field of the temperature gradient like gradPressureX, but I got an error message:</span><br style="font-size:13px" class=""><span style="font-size:13px" class="">...</span><br style="font-size:13px" class=""><span style="font-size:13px" class="">new_field[1:-1,1:-1,1:-1]  = data["Temperature"][sl_right,</span><span style="font-size:13px" class="">1:-1,1:-1]/ds</span><br style="font-size:13px" class=""><span style="font-size:13px" class="">ValueError: could not broadcast input array from shape (62,62,64) into shape (62,62,62)</span><br style="font-size:13px" class=""><br style="font-size:13px" class=""><span style="font-size:13px" class="">I then tried to re-define gradPressureX by copying the original definition (</span><a href="http://yt-project.org/docs/2.6/reference/field_list.html#gradpressurex" target="_blank" class="">http://yt-project.org/docs/2.6/reference/field_list.html#gradpressurex</a>) <span style="font-size:13px" class="">and giving it a different name, and I got the same error. The original gradPressureX works fine.</span><span style="font-size:13px" class=""> </span></div><div class=""><br style="font-size:13px" class=""><span style="font-size:13px" class="">Is it because I did not load some specific module or something?</span><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class=""><br class=""></div><div style="font-size:13px" class="">Thank you!</div></div><div style="font-size:13px" class="">Yuan</div></div></div></div>
_______________________________________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" target="_blank" class="">yt-users@lists.spacepope.org</a><br class=""><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class=""></div></blockquote></div><br class=""></div></div><br class="">_______________________________________________<br class="">
yt-users mailing list<br class="">
<a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank" class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">yt-users mailing list<br class=""><a href="mailto:yt-users@lists.spacepope.org" class="">yt-users@lists.spacepope.org</a><br class="">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br class=""></div></blockquote></div><br class=""></div></body></html>