On Feb 27, 6:47 pm, "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote:
> Andrew Felch wrote:
> > Thanks for checking. I think I narrowed the problem down to
> > inheritance. I inherit from list or some other container first:
>
> > class PointList( list, AutoReloader ):
> > def PrintHi1(self):
> >
On Feb 27, 3:47 pm, "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote:
> Andrew Felch wrote:
> > Thanks for checking. I think I narrowed the problem down to
> > inheritance. I inherit from list or some other container first:
>
> > class PointList( list, AutoReloader ):
> > def PrintHi1(self):
> >
On Feb 27, 3:23 pm, "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote:
> Andrew Felch wrote:
> > I pasted the code into mine and replaced the old. It seems not to
> > work for either unpickled objects or new objects. I add methods to a
> > class that inherits from AutoReloader and reload the module, but
On Feb 27, 5:30 pm, "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote:
> Andrew Felch wrote:
>
> > Thanks Ziga. I use pickle protocol 2 and binary file types with the
> > command: "cPickle.dump(obj, file, 2)"
>
> > I did your suggestion, i commented out the "__call__" function of
> > MetaInstanceTracker
On Feb 27, 3:50 pm, "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote:
> Andrew Felch wrote:
> > Hello all,
>
> > I'm using the metaclass trick for automatic reloading of class member
> > functions, found
> > at:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164
>
> > My problem is that if I
Hello all,
I'm using the metaclass trick for automatic reloading of class member
functions, found at:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164
My problem is that if I
1) pickle an object that inherits from "AutoReloader"
2) unpickle the object
3) modify one of the pickled'
Sometimes C++ is the right tool/style for the job, but I don't need the
speed or efficiency of C++.
--
http://mail.python.org/mailman/listinfo/python-list
I write a lot of code that looks like this:
for myElement, elementIndex in zip( elementList,
range(len(elementList))):
print "myElement ", myElement, " at index: ",elementIndex
My question is, is there a better, cleaner, or easier way to get at the
element in a list AND the index of a loop t
Below is the code to/from Boolean arrays and Unsigned integers. On my
Pentium 4, functions such as "bitwise_and" are 32 times faster when run
on 32-bit integers instead of the entire-byte-consuming-Boolean.
Good luck all:-)
uint32Mask =
numarray.array([0x0001,0x0002,0x0004,0x0008
Ahh, I figured it out. The key is to set up the shapes so they
broadcast like an outerproduct, but using bitwise_and as the operation
and the second operand as the bit filter. So we temporarily expand
each bit to a byte for numarray to be able to use it for dot products.
If you use a temporary Bo
I need to be able to store thousands of one-million-length bit arrays.
The first operations use the & operator. But eventually I must perform
an inner product with a one-million-length integer array (summing at
all the indices of the integer operand where the boolean operand has a
"1").
If I use
11 matches
Mail list logo