Re: [Tutor] collections and mappings

2019-06-21 Thread Steven D'Aprano
On Fri, Jun 21, 2019 at 10:01:43AM +1000, mhysnm1...@gmail.com wrote: > I have reviewed the collection module and do not understand mappings. I have > seen this in other languages and have never got the concept. Can someone > explain this at a very high level. It might help if you remember that

Re: [Tutor] difference between array([1,0,1]) and array([[1,0,1]])

2019-06-21 Thread Steven D'Aprano
On Thu, Jun 20, 2019 at 08:39:35PM -0300, Markos wrote: > Hi, > > I'm studying Numpy and I don't understand the difference between > > >>>vector_1 = np.array( [ 1,0,1 ] ) > > with 1 bracket and > > >>>vector_2 = np.array( [ [ 1,0,1 ] ] ) > > with 2 brackets I'm not really sure what you don't

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Steven D'Aprano
On Fri, Jun 21, 2019 at 05:18:02PM -0500, Antonio Arizpe wrote: > i only need this to function on windows 7 and 10, 32 and 64 bits > i dont need any specificity to the counter other than the numeric sum of > clicks pressed on the local machine. > as far as this idea goes its very fair to make it a

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Antonio Arizpe
if it cannot escape the simplicity of logging the keyboard as a individual mechanical entity i can understand that better now because you are right it all comes down to the OS or the driver handling to even be able to begin the register of a device. but i am more than willing to be as basic implem

Re: [Tutor] collections and mappings

2019-06-21 Thread Alan Gauld via Tutor
On 21/06/2019 11:39, mhysnm1...@gmail.com wrote: > I think I understand, but that type of maths I have not touched in 40 years. The real point is that in Python terms a mapping is nearly always just another name for a dictionary. Either a set of key/value pairs or a set of key/function pairs. Ve

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Alan Gauld via Tutor
On 21/06/2019 14:59, Antonio Arizpe wrote: > i just need help with a script thats registers keystrikes and adds up all > the times you've struck a key and gives a number of the total amount of > times the keyboard was struck. nothing specific about characters. just how > many times it was struck i

Re: [Tutor] collections and mappings

2019-06-21 Thread mhysnm1964
Allan, I think I understand, but that type of maths I have not touched in 40 years. Thus why I am not getting the concept. 😊 It was an open question as I had no clue what it was and I should have asked. Lets park the question for now and I will read the references. As I am not sure if this will

Re: [Tutor] Fwd: Re: Hii

2019-06-21 Thread Antonio Arizpe
Hey ive looked everywhere and i would really appreciate the guidance i know its not too complicated by google search results dodge my real question i just need help with a script thats registers keystrikes and adds up all the times youve struck a key and gives a number of the total amount of ti

Re: [Tutor] difference between array([1,0,1]) and array([[1,0,1]])

2019-06-21 Thread Mats Wichmann
On 6/20/19 5:39 PM, Markos wrote: > Hi, > > I'm studying Numpy and I don't understand the difference between > vector_1 = np.array( [ 1,0,1 ] ) > > with 1 bracket and > vector_2 = np.array( [ [ 1,0,1 ] ] ) > > with 2 brackets the first is one-dimensional, the second two-dimensional.

Re: [Tutor] collections and mappings

2019-06-21 Thread Alan Gauld via Tutor
On 21/06/2019 01:01, mhysnm1...@gmail.com wrote: > I have reviewed the collection module and do not understand mappings. I have > seen this in other languages and have never got the concept. Can someone > explain this at a very high level. OK. You are a master of the open ended question so I'm

[Tutor] collections and mappings

2019-06-21 Thread mhysnm1964
All, I have reviewed the collection module and do not understand mappings. I have seen this in other languages and have never got the concept. Can someone explain this at a very high level. ___ Tutor maillist - Tutor@python.org To unsubs

Re: [Tutor] word printing issue

2019-06-21 Thread mhysnm1964
Thanks, so much to learn. -Original Message- From: Tutor On Behalf Of Alan Gauld via Tutor Sent: Friday, 21 June 2019 2:26 AM To: tutor@python.org Subject: Re: [Tutor] word printing issue On 20/06/2019 11:44, mhysnm1...@gmail.com wrote: > I have a list of strings that I want to break th

[Tutor] difference between array([1,0,1]) and array([[1,0,1]])

2019-06-21 Thread Markos
Hi, I'm studying Numpy and I don't understand the difference between vector_1 = np.array( [ 1,0,1 ] ) with 1 bracket and vector_2 = np.array( [ [ 1,0,1 ] ] ) with 2 brackets The shape of vector_1 is: vector_1.shape (3,) But the shape of vector_2 is: vector_2.shape (1, 3) The tran