当前位置:网站首页>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].
边栏推荐
猜你喜欢

LeetCode:第304场周赛【总结】
[email protected]在static属性上的使用"/>@Autowired详解[email protected]在static属性上的使用

磷脂-聚乙二醇-叠氮,DSPE-PEG-Azide,DSPE-PEG-N3,MW:5000

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安装教程,在Linux环境安装MySQL8.0教程,最新教程 超详细

DAY-1 | 求两个正整数的最大公约数与最小公倍数之和——辗转相除法

parser = argparse.ArgumentParser() parsing

知识工程作业2:知识工程相关领域介绍

Mysql8.0安装教程

CV-Model【4】:MobileNet v3
随机推荐
动态代理工具类
ModuleNotFoundError No module named ‘xxx‘可能的解决方案大全
Double Strings (别总忘记substr)
cross-domain problem solving
二维数组实战项目--------《三子棋》
subprocess.CalledProcessError: Command ‘pip install ‘thop‘‘ returned non-zero exit status 1.
Keil development environment installation tutorial
mysql8.0安装教程与配置(最详细)操作简单
rem adaptation
Small program (necessary common sense for development) 1
MySQL分页查询的5种方法
[详解C语言]一文带你玩转C语言小游戏---扫雷
(Reposted) The relationship between hashcode and equals
MySQL8.0安装教程,在Linux环境安装MySQL8.0教程,最新教程 超详细
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
OD-Model [4]: SSD
ssm various configuration templates
yolov5调用ip摄像头时出现的问题
2022ACM夏季集训周报(五)
oracle内连接和外连接