Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python
Post: RE: Indexing [::-1] to Reverse ALL 2D Array Rows, ...

(Feb-24-2021, 10:57 PM)nilamo Wrote: (Feb-22-2021, 11:22 AM)Jeremy7 Wrote: Thanks for your help. I got the following answers with some help from Stack Overflow and another source: [:,::-1] reverse...
Jeremy7 General Coding Help 8 7,106 Mar-02-2021, 01:54 AM
    Thread: Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python
Post: RE: Indexing [::-1] to Reverse ALL 2D Array Rows, ...

(Feb-22-2021, 01:00 PM)Gribouillis Wrote: @Jeremy7 User titles are inserted automatically. They are references to Monty Python's Flying Circus which gave its name to the Python language.Ok.
Jeremy7 General Coding Help 8 7,106 Feb-22-2021, 07:58 PM
    Thread: Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python
Post: RE: Indexing [::-1] to Reverse ALL 2D Array Rows, ...

(Feb-22-2021, 08:54 AM)Gribouillis Wrote: Not a numpy expert here, but this seems to reverse all the axis simultaneously import numpy as np random_array = np.round(10 * np.random.rand(5, 4, 4)) so...
Jeremy7 General Coding Help 8 7,106 Feb-22-2021, 11:22 AM
    Thread: Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python
Post: RE: Indexing [::-1] to Reverse ALL 2D Array Rows, ...

(Feb-22-2021, 08:46 AM)DeaD_EyE Wrote: You should try: https://numpy.org/doc/stable/reference/g...numpy-flipThanks for your help; I'm aware of numpy.flip(). numpy.flip() works great, but I wanted to...
Jeremy7 General Coding Help 8 7,106 Feb-22-2021, 11:06 AM
    Thread: Indexing [::-1] to Reverse ALL 2D Array Rows, ALL 3D, 4D Array Columns & Rows Python
Post: Indexing [::-1] to Reverse ALL 2D Array Rows, ALL ...

How do you get indexing [::-1] to reverse ALL 2D array rows and ALL 3D and 4D array columns and rows simultaneously? I can only get indexing [::-1] to reverse 2D array columns. Python import numpy as...
Jeremy7 General Coding Help 8 7,106 Feb-22-2021, 08:00 AM
    Thread: Combine Two Recursive Functions To Create One Recursive Selection Sort Function
Post: RE: Combine Two Recursive Functions To Create One ...

(Jan-16-2021, 12:35 PM)Serafim Wrote: range(len(lst)) means [0, 1, 2, ..., len(lst)-1] and range(1, len(lst)) starts at 1, giving [1, 2, ..., len(lst)-1] and as I use lst[0] as start value (element ...
Jeremy7 General Coding Help 12 7,362 Jan-17-2021, 03:02 AM
    Thread: Combine Two Recursive Functions To Create One Recursive Selection Sort Function
Post: RE: Combine Two Recursive Functions To Create One ...

(Jan-14-2021, 07:49 PM)Serafim Wrote: def selection_sort(lst): result = [] while lst: element = lst[0] for i in range(1, len(lst)): if lst[i] < element: ...
Jeremy7 General Coding Help 12 7,362 Jan-16-2021, 09:48 AM
    Thread: Combine Two Recursive Functions To Create One Recursive Selection Sort Function
Post: RE: Combine Two Recursive Functions To Create One ...

(Jan-14-2021, 07:49 PM)Serafim Wrote: [quote='deanhystad' pid='135130' dateline='1610610557'] I do not understand your request. You talk about having 2 recursive functions, but you have no recursiv...
Jeremy7 General Coding Help 12 7,362 Jan-14-2021, 11:43 PM
    Thread: Combine Two Recursive Functions To Create One Recursive Selection Sort Function
Post: RE: Combine Two Recursive Functions To Create One ...

(Jan-13-2021, 10:43 PM)Serafim Wrote: Selection sort is not really fit for recursive algorithms as the easiest way to perform a selection sort is really by two loops, but of course it is doable. Edi...
Jeremy7 General Coding Help 12 7,362 Jan-13-2021, 11:07 PM
    Thread: Combine Two Recursive Functions To Create One Recursive Selection Sort Function
Post: Combine Two Recursive Functions To Create One Recu...

This is just a personal project I'm working on, and have been working on it for days, looking at several Recursive Selection Sort functions online to help me accomplish this goal, but to no avail beca...
Jeremy7 General Coding Help 12 7,362 Jan-13-2021, 10:04 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020