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

本站现有博文338篇,共被浏览987196次

本站已经建立2699天!

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