<jupyter_start><jupyter_text>New to Plotly?Plotly's Python library is free and open source! [Get started](https://plot.ly/python/getting-started/) by downloading the client and [reading the primer](https://plot.ly/python/getting-started/).You can set up Plotly to work in [online](https://plot.ly/python/getting-started/initialization-for-online-plotting) or [offline](https://plot.ly/python/getting-started/initialization-for-offline-plotting) mode, or in [jupyter notebooks](https://plot.ly/python/getting-started/start-plotting-online).We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!  ImportsThis tutorial imports [Plotly](https://plot.ly/python/getting-started/) and [Numpy](http://www.numpy.org/).<jupyter_code>import plotly.plotly as py
from plotly.tools import FigureFactory as FF

import numpy as np<jupyter_output><empty_output><jupyter_text>Transpose`np.transpose()` returns a transposed version of an ND-array. The process of transposing an ND-array (or a matrix) is reflecting the array about it's main diagonal which runs from top left to bottom right.<jupyter_code>import plotly.plotly as py
from plotly.tools import FigureFactory as FF

array = np.array([[1, 2, 3, 4, 5],
                 [6, 7, 8, 9, 10],
                 [11, 12, 13, 14, 15]])

fig = FF.create_annotated_heatmap(array, colorscale='Greens')
fig.layout.title = 'Untransposed Array'
py.iplot(fig, filename='numpy-untransposed')
import plotly.plotly as py
from plotly.tools import FigureFactory as FF

array = np.array([[1, 2, 3, 4, 5],
                 [6, 7, 8, 9, 10],
                 [11, 12, 13, 14, 15]])

transposed_array = np.transpose(array)

fig = FF.create_annotated_heatmap(transposed_array, colorscale='Greens')
fig.layout.title = 'Transposed Array'
py.iplot(fig, filename='numpy-transposed')
help(np.transpose)
from IPython.display import display, HTML

display(HTML('<link href="//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Inconsolata|Ubuntu+Mono:400,700" rel="stylesheet" type="text/css" />'))
display(HTML('<link rel="stylesheet" type="text/css" href="http://help.plot.ly/documentation/all_static/css/ipython-notebook-custom.css">'))

! pip install git+https://github.com/plotly/publisher.git --upgrade
import publisher
publisher.publish(
    'Transpose.ipynb', 'numpy/transpose/', 'Transpose | plotly',
    'Transposing a 2D NumPy array swaps the rows and columns of the array. It is reversible so transposing twice returns the original array.',
    title = 'Numpy Transpose | plotly',
    name = 'Transpose',
    has_thumbnail='true', thumbnail='thumbnail/modify_the_array.jpg', 
    language='numpy', page_type='example_index',
    display_as='modify-the-array', order=6)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1371367824238129, 'fraction_numerical': 0.021970233876683204, 'mean_word_length': 4.930672268907563, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '103741', 'license': 'CC-BY-3.0', 'n_tokens_mistral': 996, 'n_tokens_neox': 905, 'n_words': 226, 'path': '_posts/numpy/transpose/Transpose.ipynb', 'repo_name': 'bmb804/documentation', 'size': '2822'}