EADST

Numpy: Sorting Multidimensional Array

Sorting Multidimensional Array with numpy. Here is the code.

import numpy as np

data = np.array([[7, 8], [4, 6], [1, 9], [3, 5], [2, 0]])
data = data[np.argsort(data[:, 0])]
print(data)
'''
output:
[[1 9]
 [2 0]
 [3 5]
 [4 6]
 [7 8]]
'''
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
Translation Michelin tar logger HuggingFace Nginx FlashAttention Vim Anaconda JSON Windows Disk Logo Color WebCrawler Python 云服务器 报税 证件照 LLM Domain Paper Plotly Clash TensorFlow Interview 音频 TTS DeepStream 顶会 Google Use Base64 Animate 多线程 NLTK CTC Tensor FastAPI Git InvalidArgumentError Video EXCEL GIT 财报 PIP 强化学习 Firewall API Web NLP icon XML uWSGI v0.dev git Website torchinfo SQLite Land UNIX Permission Pickle Bipartite Crawler VPN MD5 算法题 净利润 Pillow SVR CLAP Proxy Search Jupyter BeautifulSoup Transformers Ptyhon LoRA Mixtral QWEN YOLO Hotel Heatmap RAR Pytorch Distillation Streamlit C++ 继承 FP64 图形思考法 git-lfs UI CAM Augmentation Data Markdown hf NameSilo 域名 HaggingFace Paddle llama.cpp 递归学习法 transformers FP32 LeetCode Numpy Password FP16 Bitcoin BTC Algorithm Input VSCode Image2Text Tiktoken Claude 第一性原理 CEIR v2ray Qwen2.5 CC ONNX 多进程 Hilton Django printf uwsgi RGB Qwen News 阿里云 Template Sklearn Math Cloudreve GPT4 PDF mmap Safetensors ChatGPT Ubuntu PyTorch Github CSV tqdm Excel Knowledge GPTQ Pandas Datetime Llama 签证 Quantize Agent TensorRT scipy PDB CV AI Linux diffusers Tracking Attention COCO Bert TSV DeepSeek CUDA Dataset WAN Docker OpenAI Miniforge VGG-16 Hungarian PyCharm Vmess Zip Freesound Shortcut OCR 公式 Diagram SQL LaTeX Jetson SAM 关于博主 Card GGML ModelScope Quantization BF16 ResNet-50 飞书 Magnet Food Gemma Bin GoogLeNet SPIE Review Plate 搞笑 Statistics Breakpoint Qwen2 IndexTTS2 版权 FP8 OpenCV Conda LLAMA Baidu XGBoost 图标 腾讯云 Random
站点统计

本站现有博文322篇,共被浏览788853

本站已经建立2484天!

热门文章
文章归档
回到顶部