- 博客(3)
- 收藏
- 关注
原创 delete数组报错
这里发生的现象1.执行delete[]语句时,程序直接弹窗,崩溃。2.执行delete[]语句时,程序卡死。将delete语句注释掉,又正常了,但发生了内存泄露。发生的原因是指针tempIndecator++无意中使指针中发生移动,不再指向数组的首地址
2023-03-23 19:50:17
445
原创 求矩阵的鞍点
求矩阵的鞍点,代码如下:import numpy as npA = np.array(((9, 80, 205, 40), (90, -60, 96, 1), (210, -3, 101, 89)))print(A)for i in range(len(A)): a = A[i] r_max = max(a) a = a.tolist()如果缺少a=a.tolist(),会发生报错'numpy.ndarray' object has no attribute 'index'
2022-08-03 22:37:55
84
原创 ‘utf-8‘ codec can‘t decode byte 0xd4 in position 98: invalid continuation byte 报错解决方案
在运行以下代码读取文件时时发生报错,'utf-8' codec can't decode byte 0xd4 in position 98: invalid continuation byte 代码如下:import pandas as pd# 读csv文件ds = pd.read_csv('nba.csv')print(ds.to_string())最终找到解决方案............
2022-07-28 17:15:10
478
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人