NumPy fliplr reverses column order while keeping each row in its original position
A left to right reversal changes where columns appear, without changing the values stored in those columns. Academia Master Trader explains NumPy fliplr in English for readers in Bulgaria. We will use a rectangular array, track individual coordinates and separate horizontal reversal from a transpose or an up to down reversal. Every number in the output already exists in the input. The example describes a change in arrangement, not a forecast, new observations or evidence of financial performance.
Write the input as two complete rows
After import numpy as np, define a = np.array([[8,3,6],[2,9,4]]). The input has shape (2,3), meaning two rows and three columns. Row zero contains eight, three and six in that order. Row one contains two, nine and four. Recording the rows before applying a transformation makes it easier to tell which direction changes.
The call b = np.fliplr(a) gives [[6,3,8],[4,9,2]]. The shape remains (2,3). Row zero is still the first row, but its column order is reversed. Row one is still the second row and its column order is reversed too. Each row keeps the same members. No value crosses from the first row into the second row during this operation.
Follow the column mapping explicitly
For an input with three columns, original column zero becomes output column two, original column one remains in the middle and original column two becomes output column zero. Eight therefore moves from (0,0) to (0,2), while six moves from (0,2) to (0,0). The row coordinate stays zero in both cases.
In the second row, two moves from (1,0) to (1,2) and four moves from (1,2) to (1,0). Nine remains at (1,1), because the middle column of a three column array maps to itself. For a width of n columns, the general column rule is j -> n-1-j. The row coordinate remains unchanged. This rule explains both the moving edge columns and the fixed middle column here.

Read the figure row by row
The figure places the original array beside the horizontally reversed result. Read the top row on the left as eight, three, six and its counterpart on the right as six, three, eight. Then read the second row separately. Its left side is two, nine, four and its right side is four, nine, two. The shared shape label confirms that neither dimension changed.
The highlighted edge columns make the mapping easier to see. The leftmost original column contains eight above two; the rightmost output column contains those same values in the same vertical order. A whole column changes its horizontal position while its entries keep their row positions. The total of all six entries also stays unchanged, because the operation rearranges values rather than adding or removing them.
Separate reversal from a transpose
The expression a.T returns [[8,2],[3,9],[6,4]], with shape (3,2). That is a transpose, which exchanges row and column roles. It is not the result of fliplr. Comparing shapes is especially useful for this rectangular example: the horizontal reversal stays two by three, while the transpose becomes three by two.
An up to down reversal is different again. The call np.flipud(a) returns [[2,9,4],[8,3,6]]. It reverses the order of rows while preserving the order inside each row. The first row of that output starts with two, whereas the first row of our fliplr output starts with six. Name the operation and its changing axis before describing a result simply as reversed.
Remember the input requirement and shared data
NumPy fliplr requires at least two dimensions. A flat array such as np.array([8,3,6]) does not meet that requirement. A one row matrix such as np.array([[8,3,6]]) does, and its reversed result is [[6,3,8]]. The extra row structure is meaningful even when there is only one row.
The documented result is a view, so it shares data with the source array. Use .copy() when an independent result is needed before later edits. Continue learning with Academia Master Trader at academiamastertrader.com.br and in Aprenda. Record the shape, check both edge columns and follow a middle entry. Those checks explain the reversal without confusing it with a rotation, transpose or change in numerical values.