<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">Oops,</div><div dir="ltr"><br></div><div dir="ltr">Somehow that got sent before I was done. (Like my use of the passive voice there?)</div><div dir="ltr"><br></div><div dir="ltr">Here is a complete message:</div><div dir="ltr"><br></div><div dir="ltr">Do any of you know of a style guide for computational / numpy code?</div><div dir="ltr"><br></div><div dir="ltr">I don't mean code that will go into numpy itself, but rather, users code that uses numpy (and scipy, and...)</div><div dir="ltr"><br></div><div dir="ltr">I know about (am a proponent of) PEP8, but it doesn’t address the unique needs of scientific programming.</div><div dir="ltr"><br></div><div dir="ltr">This is mostly about variable names. In scientific code, we often want:</div><div dir="ltr"><br></div><div dir="ltr">- variable names that match the math notation- so single character names, maybe upper or lower case to mean different things ( in ocean wave mechanics, often “h” is the water depth, and “H” is the wave height)</div><div dir="ltr"><br></div><div dir="ltr">-to distinguish between scalar, vector, and matrix values — often UpperCase means an array or matrix, for instance.</div><div dir="ltr"><br></div><div dir="ltr">But despite (or because of) these unique needs, a style guide would be really helpful.</div><div dir="ltr"><br></div><div dir="ltr">Anyone have one? Or even any notes on what you do yourself?</div><div dir="ltr"><br></div><div dir="ltr">Thanks,</div><div dir="ltr">-CHB</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div></div></div>
</div></blockquote></body></html>