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

本站现有博文321篇,共被浏览773863

本站已经建立2463天!

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