Skip to main content

Rotate any matrix of any type, either clockwise or anti-clockwise instantly.

Project description

ROTATE MATRIX:

Install:

Install it using:

         pip install rotate-matrix

Rotate any matrix/multi-dimentional array of any type, either clockwise or anti-clockwise instantly.

Contains two functions:

1) clockwise(): Takes l as parameter which is of type list, and pases the clockwised rotated version list l.

        import rotate_matrix
        l = [[1,2,4,3],[7,8,5,6],[8,6,5,4]]
        print(rotate_matrix.clockwise(l))

Output:

        [(3, 6, 4), (4, 5, 5), (2, 8, 6), (1, 7, 8)]

2) anti-clockwise(): Takes l as parameter which is of type list, and passes the anti-clockwise rotated version of list l.

         import rotate_matrix
        l = [[1,2,4,3],[7,8,5,6],[8,6,5,4]]
        print(rotate_matrix.anti_clockwise(l))

Output:

       [(8, 7, 1), (6, 8, 2), (5, 5, 4), (4, 6, 3)]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rotate_matrix-0.0.7.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file rotate_matrix-0.0.7.tar.gz.

File metadata

  • Download URL: rotate_matrix-0.0.7.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.9.0

File hashes

Hashes for rotate_matrix-0.0.7.tar.gz
Algorithm Hash digest
SHA256 c13216673e5bc9c830fa8b68626ecbf1e46b61e21944471a4cec2754bb2b8cf2
MD5 bf6f0331f95f7206b89863fabd12eb59
BLAKE2b-256 527dbf868863a9b76fcb7a0147e1fa1c09febb85d5382d87191ac087b8b7251a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page