Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Array definition error

by gri6507 (Deacon)
on Apr 15, 2005 at 15:25 UTC ( [id://448220]=note: print w/replies, xml ) Need Help??


in reply to Re: Array definition error
in thread Array definition error

Actually that's not true. The line $trainset[scalar(@trainset)] = \@inputs; will increase the side of the @trainset array so that when $trainset[scalar(@trainset)] = \@outputs; is called, scalar(@trainset) will be one larger and therefore not overwrite the original data. This is akin to a push.

Replies are listed 'Best First'.
Re^3: Array definition error
by JediWizard (Deacon) on Apr 15, 2005 at 15:49 UTC

    You statment is true. However, I'd like to ask why you are not simply using push? Does this method offer some benifit that I do not see? If so, please enlighten me.


    A truely compassionate attitude towards other does not change, even if they behave negatively or hurt you

    —His Holiness, The Dalai Lama

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://448220]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-03-29 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found