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

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

本站已经建立2489天!

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