[Numpy-discussion] abstraction and interfaces
Alan G Isaac
aisaac at american.edu
Fri Oct 12 09:20:50 EDT 2007
On Fri, 12 Oct 2007, Renato Serodio apparently wrote:
> The scripts that produce these metrics use Scipy/Numpy
> functions that operate on data conveniently converted to
> numpy arrays. They're quite specific, and I tend to
> produce/tweak a lot of them. So, to fit in this
> application someone suggested I programmed 'interfaces'
> (in java jargon) to them - that way I could develop the
> whole wrapper application without giving much thought to
> the actual number-crunching bits.
That sounds quite right. Check out
<URL:https://projects.scipy.org/scipy/scikits/browser/trunk/openopt/scikits/openopt/solvers/optimizers/optimizer>
<URL:http://svn.scipy.org/svn/scipy/trunk/scipy/stats/models/>
for examples that may be relevant to your project.
Python does not have interfaces per se, but that does
not stop you from designing interface-like classes and
inheriting from them.
fwiw,
Alan Isaac
More information about the NumPy-Discussion
mailing list