Mark E. Fenner wrote:
> Paul McGuire wrote:
>
> > "Mark E. Fenner" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >> Hello all,
> >>
> >
> >>
> >> Here's my class of the objects being copied:
> >>
> >> class Rule(list):
> >> def __init__(self, lhs=None, rhs=None, nClasses=0,
"Mark E. Fenner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > Save inheritance for the true "is-a" relationships among your problem
> > domain
> > classes. For instance, define a base Rule class, and then you can
extend
> > it with things like DeterministicRule, ProbabilisticRul
Paul McGuire wrote:
> "Mark E. Fenner" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Hello all,
>>
>
>>
>> Here's my class of the objects being copied:
>>
>> class Rule(list):
>> def __init__(self, lhs=None, rhs=None, nClasses=0, nCases=0):
>> self.nClasses = nClass
"Mark E. Fenner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello all,
>
>
> Here's my class of the objects being copied:
>
> class Rule(list):
> def __init__(self, lhs=None, rhs=None, nClasses=0, nCases=0):
> self.nClasses = nClasses
> self.nCases = nCases
>
danielx wrote:
>
> Mark E. Fenner wrote:
>> Mark E. Fenner wrote:
>>
>> > John Machin wrote:
>> >
>> >>
>> >> Mark E. Fenner wrote:
>> >>
>> >>> Here's my class of the objects being copied:
>> >>
>> >> Here's a couple of things that might help speed up your __init__
>> >> method, and hence your c
Mark E. Fenner wrote:
> Mark E. Fenner wrote:
>
> > John Machin wrote:
> >
> >>
> >> Mark E. Fenner wrote:
> >>
> >>> Here's my class of the objects being copied:
> >>
> >> Here's a couple of things that might help speed up your __init__
> >> method, and hence your copy method:
> >>
> >>>
> >>> cl
Mark E. Fenner wrote:
> Michael Spencer wrote:
>
>> Mark E. Fenner wrote:
>>
>>> and the copy is taking the majority (42%) of my execution time.
>>> So, I'd like to speed up my copy. I had an explicit copy method that did
>>> what was needed and returned a new object, but this was quite a bit
>>>
Mark E. Fenner wrote:
> John Machin wrote:
>
>>
>> Mark E. Fenner wrote:
>>
>>> Here's my class of the objects being copied:
>>
>> Here's a couple of things that might help speed up your __init__
>> method, and hence your copy method:
>>
>>>
>>> class Rule(list):
>>> def __init__(self, lh
John Machin wrote:
>
> Mark E. Fenner wrote:
>
>> Here's my class of the objects being copied:
>
> Here's a couple of things that might help speed up your __init__
> method, and hence your copy method:
>
>>
>> class Rule(list):
>> def __init__(self, lhs=None, rhs=None, nClasses=0, nCases=0
Mark E. Fenner wrote:
> Here's my class of the objects being copied:
Here's a couple of things that might help speed up your __init__
method, and hence your copy method:
>
> class Rule(list):
> def __init__(self, lhs=None, rhs=None, nClasses=0, nCases=0):
def __init__(self, lhs=None, r
Michael Spencer wrote:
> Mark E. Fenner wrote:
>
>>
>> and the copy is taking the majority (42%) of my execution time.
>> So, I'd like to speed up my copy. I had an explicit copy method that did
>> what was needed and returned a new object, but this was quite a bit
>> slower than using the stan
Mark E. Fenner wrote:
>
> and the copy is taking the majority (42%) of my execution time.
> So, I'd like to speed up my copy. I had an explicit copy method that did
> what was needed and returned a new object, but this was quite a bit slower
> than using the standard lib copy.copy().
>
How are
Hello all,
I have a code where my inner loop looks like:
allNew = []
for params in cases:
newObj = copy(initialObject)
newObj.modify(params)
allNew.append(newObj)
return allNew
and the copy is taking the majority (42%) of my execution time.
So, I'd like to speed up my copy. I had an
13 matches
Mail list logo