<div dir="ltr"><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 3, 2015 at 7:35 PM, Yuxiang Wang <span dir="ltr"><<a href="mailto:yw5aj@virginia.edu" target="_blank">yw5aj@virginia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>When I use %%cython magic, it automatically knows to include the np.get_include(), which works really great. But just being curious - how was that achieved? Did the code detect whether numpy was imported, and if yes it will add np.get_include to the include_dirs?</div><div><br></div></div></blockquote><div><br></div><div>You may be interested in the implementation:<div><br></div><div><a href="https://github.com/cython/cython/blob/9e956fa59e3899a5fae06519d3ca9728db52adb0/Cython/Build/IpythonMagic.py#L192">https://github.com/cython/cython/blob/9e956fa59e3899a5fae06519d3ca9728db52adb0/Cython/Build/IpythonMagic.py#L192</a></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>Shawn</div><span class=""><font color="#888888"><div><div><br></div>-- <br><div><div dir="ltr">Yuxiang "Shawn" Wang<br>Gerling Research Lab<br>University of Virginia<br><a href="mailto:yw5aj@virginia.edu" target="_blank">yw5aj@virginia.edu</a><br><a href="tel:%2B1%20%28434%29%20284-0836" value="+14342840836" target="_blank">+1 (434) 284-0836</a><div><a href="https://sites.google.com/a/virginia.edu/yw5aj/" target="_blank">https://sites.google.com/a/virginia.edu/yw5aj/</a><br></div></div></div>
</div></font></span></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div></div>