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

本站现有博文334篇,共被浏览930838

本站已经建立2639天!

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