Machine learning in trading: theory, models, practice and algo-trading - page 1949

 
>>> import numpy as np
>>> a=[1,2,3]
>>> a=np.asarray(a)
>>> b=a[:]
>>> b[0]=10
>>> print(a)
[10  2  3]
>>> print(a is b.base)
True
>>> print(id(a),id(b))
2022320917680 2022322616880

And in the case of lists

a=[1,2,3]
b=a[:] - создает копию (новый объект)

a=[1,2,3]
b=a - создает ссылку

just keep in mind that nampai is not a python but a third party library and the behavior may be different compared to built-in types

It's even more complicated with pandas)
 
Maxim Dmitrievsky:

Thanks, I figured it out a little bit.

Out=In[1:,-1]
And it worked this way
np.random.seed(1)
np.random.shuffle(In)
np.random.seed(1)
np.random.shuffle(Out)
 
Rorschach:

Thanks, figured it out a little bit. I was spoiled by this line.

and it worked like this

Yes, honestly, it's hard to get used to the logic of python)))) equals not equal link damn)))))

 
Retrog Konow:

The "experts" have poured mud on themselves with their rhetoric. Now, they are no longer perceived as before. And there was respect for them...

Peter, did you read books as a child?

Don't bother them, let them do their homework.

 
Renat Akhtyamov:

Peter, did you read books as a child?

Don't disturb them, let them learn their lessons.

I will not interfere. I am powerless against the collective "skunk defense.) Gone.
 
Retrog Konow:
I won't get in the way. I'm powerless against the collective "skunk defense.") Gone.

you have a lot to lose by conquering the internet, I mean money.

Internet and neuronics are probably synonymous.

 
I wonder which one of you is Tamara? Probably 'Sweetheart'. And the other still can not get away from the offense, talking to himself already, wrapping a three-story sophisms, to take away the offense. ♪ Got a slap on the wrist, went home and told everyone how it's all one word ♪ And then he went off with his head proudly down...
 
Maxim Dmitrievsky:
I wonder which one of you is Tamara? Probably 'Sweetheart'. And the second still can not get away from the offense, talking to himself already, wrapping a three-story sophisms, to take offended. "He got a slap on the wrist, went home and told everyone how it was all one word... And then you fell off with your head proudly lowered.
You've been traumatized. Why don't you see a psychiatrist... I don't want to add to your trauma. Stay out of your way.
 
Renat Akhtyamov:

you can lose a lot by conquering the internet, I mean money

Internet and neuronics are probably synonymous.

The main thing is not to lose face)

 
Tag Konow:
You've been traumatized. See a psychiatrist or something.

;)

Reason: