On 12/18/2010 2:06 AM, Peter Otten wrote:
I don't think /how/ you are trying it is stupid though I'm not so sure about
/what/ .
Thank you all for very helpful suggestions. It took me a while to chew
on this before I could respond. I learned a lot about descriptors and
their interactions wit
Hi all,
I've been working on creating 2D bounding box (envelope) classes to
describe spatial data. Variations of these are available in other
spatial libraries (e.g. Shapely), although I haven't found envelopes
specific to raster data that also specifies cell size. Could be I just
haven't fo
On 5/4/2011 10:30 AM, Patrick P. wrote:
Hello,
I hope this is the right way to ask my question, if not, sorry to bother
you. Maybe you can tell me who to ask.
Ok so here is my code
[snip]
A = np.array([[m111,m121], [m211,m221]])
B = np.array([[m112,m122], [m212,m222]])
print(np.dot(A,B))
Trac
On 8/14/2012 5:28 AM, eryksun wrote:
On Tue, Aug 14, 2012 at 6:01 AM, eryksun wrote:
Right, I overlooked classes with __slots__ and that override __new__
and other special methods. copy() is the better and more customizable
solution.
If copying is good enough, then this should work:
from co
Is it possible to create a subclass of a superclass that doesn't have an
__init__ and is only created through another class. Here is an example
of what isn't working:
class Spam(object):
def __new__(cls, *args):
return super(Spam, cls).__new__(cls, args)
def __init__(self):
On 8/24/2012 12:01 PM, Steven D'Aprano wrote:
That's not a use-case. A use-case is a real-world problem that you
are trying to solve. You have skipped the problem and jumped straight
to what you think is the solution: "create a subclass which can't be
instantiated directly".
I can't imagine any