Python/torch/深度学习——numpy库

Python/torch/深度学习——numpy 库


文章目录

  • Python/torch/深度学习——numpy 库
  • 前言
  • numpy 库版本
    • 版本变化
      • 变化1
  • numpy 库安装


前言

关于Numpy库的碎碎念,想到点记录下


numpy 库版本

  • 记录时间:2024年11月12日
    – numpy 现在已经2.+版本了,但是部分函数发生了变化
    – 自用 numpy 版本 1.26.4

版本变化

目前遇到的变化如下

变化1

# 2.0和2.1版本
numpy.reshape(ndarray, shape)
set(numpy.reshape(ndarray, shape))  # 能用,会报Warning,提示为非Iterable
# 1.26.4版本
numpy.reshape(ndarray, shape)
ndarray.reshape(shape)  # 2.0和2.1版本中没了,但是能用,会报Warning
set(numpy.reshape(ndarray, shape))  
set(ndarray.reshape(shape))  

numpy 库安装

# pip版本
# 默认下新版
pip install numpy
# conda版本
# 默认下新版
conda install numpy
# 指定版本
# 适配cuda11.7
conda install numpy=1.26.4

你可能感兴趣的:(python,深度学习,numpy)