[Tutor] Python question

Dennis Lee Bieber wlfraed at ix.netcom.com
Tue Apr 19 00:25:39 EDT 2022


On Tue, 19 Apr 2022 08:45:11 +1000, Cameron Simpson <cs at cskk.id.au>
declaimed the following:

>On 19Apr2022 08:02, DL Neil <PythonList at DancesWithMice.info> wrote:
>>BTW this looks more like numpy than Python...
>
>numpy is a popular Python library. I've no objection to dealing with it 
>in the "tutor" list for questions we can help with. (I'm not a numpy 
>expert, though I'm starting to dabble in it.)
>

	I'd tend to concur this is a numpy question (other than the OP's "but I
don't know how to do it in Phyton [sic]" there is nothing in the assignment
that requires pure Python rather than numpy built-ins).

	This sounds very much like an exercise in slicing, numpy.split,
numpy.concatenate, numpy.insert, or numpy.stack. Maybe numpy.zeros, also.
The OP should probably be examining the numpy documentation:
https://numpy.org/doc/stable/reference/routines.html



-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/



More information about the Tutor mailing list