|
From: Christopher B. <Chr...@no...> - 2006-02-10 21:33:36
|
Bill Baxter wrote: > By the way, is there any python way to tell which package a symbol is coming > from? Yes. Don't use "import *". There is a long tradition of using NumPy this way: from numpy import * But now I always use it this way: import numpy as N (or nx, or whatever short name you want). I like it, because it's always clear where stuff is coming from. numpy's addition of a number of methods for what used to be functions helps make this more convenient too. "Namespaces are one honking great idea -- let's do more of those!" from: http://www.python.org/doc/Humor.html#zen -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |