鱼C论坛

 找回密码
 立即注册
查看: 4926|回复: 2

[已解决]代码请教:cg = pc(data, alpha, indep_test, stable, uc_rule, uc_priority, mvpc...

[复制链接]
发表于 2022-10-22 10:03:11 | 显示全部楼层    本楼为最佳答案   
本帖最后由 suchocolate 于 2022-10-22 10:04 编辑
  1. print(help(np.ndarray))
  2. Help on class ndarray in module numpy:

  3. class ndarray(builtins.object)
  4. |  ndarray(shape, dtype=float, buffer=None, offset=0,
  5. |          strides=None, order=None)
  6. |  
  7. |  An array object represents a multidimensional, homogeneous array
  8. |  of fixed-size items.  An associated data-type object describes the
  9. |  format of each element in the array (its byte-order, how many bytes it
  10. |  occupies in memory, whether it is an integer, a floating point number,
  11. |  or something else, etc.)
  12. |  
  13. |  Arrays should be constructed using `array`, `zeros` or `empty` (refer
  14. |  to the See Also section below).  The parameters given here refer to
  15. |  a low-level method (`ndarray(...)`) for instantiating an array.
  16. |  
  17. |  For more information, refer to the `numpy` module and examine the
  18. |  methods and attributes of an array.
  19. |  
  20. |  Parameters
  21. |  ----------
  22. |  (for the __new__ method; see Notes below)
  23. |  
  24. |  shape : tuple of ints
  25. |      Shape of created array.
复制代码

shape需要用元祖形式传入:
  1. data1= np.ndarray((n_samples,n_features))
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-4-1 17:08

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表