当前位置:网站首页>np.unique() function
np.unique() function
2022-08-02 03:33:00 【woshicaiji12138】
data = data.valueslis = np.unique(data[:, 1span>])
I encountered the above code today, but I don't know the usage of the np.unique() function. After consulting the data, I found that the function np.unique(array) can remove the repeated numbers in the input array and sort them.
For example:
import numpy as nparray=[1,2,2,3,3,3]lis=np.unique(array)
The output is [1,2,3].
边栏推荐
- 我的两周年创作纪念日
- [详解C语言]一文带你玩转C语言小游戏---三子棋
- [Basic Tutorial of Remote Control Development 1] Crazy Shell Open Source Formation Drone-GPIO (Remote Control Indicator Light Control)
- Daily practice------There are n integers, so that the previous numbers are moved back m positions in order, and the last m numbers become the first m numbers
- Mysql8.0安装教程
- oracle内连接和外连接
- 错误:with open(txt_path,‘r‘) as f: FileNotFoundError: [Errno 2] No such file or directory:
- Week 7 Review
- LeetCode:1374. 生成每种字符都是奇数个的字符串【签到题】
- API 低代码开发:接口大师,一套开发、管理和提供接口的产品框架
猜你喜欢
Daily practice------There are n integers, so that the previous numbers are moved back m positions in order, and the last m numbers become the first m numbers
MySQL分区表详解
OD-Model【4】:SSD
JVM学习----垃圾回收--G1
青蛙跳台阶:我如何得知它是一道斐波那契数列题?——应用题破题“三板斧”
MySQL中字符串比较大小(日期字符串比较问题)
2022年比若依更香的开源项目
5. Hezhou Air32F103_LCD_key
MySQL两阶段提交串讲
[Basic Tutorial of Remote Control Development 1] Crazy Shell Open Source Formation Drone-GPIO (Remote Control Indicator Light Control)
随机推荐
【深度学习】从LeNet-5识别手写数字入门深度学习
【程序人生】做了多年的运维,靠什么转行拿下12K+年终奖的薪资?
SSM整合
np.isnan()
ssm various configuration templates
@Accessors 注解详解
Day34 LeetCode
磷脂-聚乙二醇-醛基 DSPE-PEG-Aldehyde DSPE-PEG-CHO MW:5000
UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the index ing argu
@ApiModel 和 @ApiModelProperty
Double Strings (别总忘记substr)
Monaco Editor 的基本用法
「PHP基础知识」空值(null)的使用
「PHP基础知识」PHP中对象的使用
CV-Model [4]: MobileNet v3
青蛙跳台阶:我如何得知它是一道斐波那契数列题?——应用题破题“三板斧”
HCIP-第十天-BGP综合实验
JJWT tool class
DSPE-PEG-PDP,DSPE-PEG-OPSS,磷脂-聚乙二醇-巯基吡啶供应,MW:5000
day11--shell脚本