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

本站现有博文333篇,共被浏览918071

本站已经建立2623天!

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