- 博客(6)
- 收藏
- 关注
原创 ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation #1
问题描述:ValueError: threshold must be numeric and non-NAN, try sys.maxsize for untruncated representation #12987解决方案:找到出问题的位置输入代码import sys把np.set_printoptions(threshold=np.nan)改为:np.set_printoptions(threshold=np.maxsize)...
2020-09-07 11:28:30
469
原创 Python第四课
#append 在列表末尾添加新的元素ist1 = [1,2,3,4,5]list1.append(6) print(list1) #输出 [1,2,3,4,5,6]list1.append([7,8,9])print(list1) #输出 [1,2,3,4,5,6,[7,8,9]]#在末尾一次性追加另一个列表中的多个值list2 = [1,2,3,4,5]lis...
2019-07-13 18:28:21
171
原创 Python第三课
While 循环语句#while 语句:#格式:#while 表达式::语句#逻辑:当程序执行到while语句时,首先计算“表达式”#的值,如果“表达式”的值为假,那么结束整个while语句。#如果“表达式”的值为真,则执行“语句”,执行完语句,#再去计算表达式的值。如果表达式的值为假,那么结束整个#while语句。num = int(input("请输入你的数字"))whi...
2019-07-09 18:44:31
127
原创 Python第二课
String 字符串创建字符串str1 = "zqy is a good man"str2 = "zqy is a nice men"str3 = "zqy is a handsome man"2.#字符串运算#字符串连续str4 = "zqy is a "str5 = "good man"str6 = str4 + str5print("str7 =",str6)pri...
2019-07-09 18:42:27
205
原创 Python第一课
数字类型#导入一个库:封装一些功能#math :数学相关的库import mathimport randomf1 = 1.1f2 = 2.2print(f1 + f2)print(int(1.9))print(float(1))print(int("+123"))print(int("-123"))#abs()取绝对值a1 = -10print(abs(a1))...
2019-07-07 16:47:58
287
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人