当前位置:网站首页>About the third parameter of np.zeros(): c represents similar to c language, row priority; F represents column priority record
About the third parameter of np.zeros(): c represents similar to c language, row priority; F represents column priority record
2022-08-06 07:52:54【iudio_cool】
关于np.zeros()第三个参数:c代表与c语言类似,行优先;FRepresents column-first records
关于np.zeros()的用法
英文原文:
def zeros(shape, dtype=None, order='C', *args, **kwargs): # real signature unknown; NOTE: unreliably restored from __doc__
"""
zeros(shape, dtype=float, order='C', *, like=None)
Return a new array of given shape and type, filled with zeros.
Parameters
----------
shape : int or tuple of ints
Shape of the new array, e.g., ``(2, 3)`` or ``2``.
dtype : data-type, optional
The desired data-type for the array, e.g., `numpy.int8`. Default is
`numpy.float64`.
order : {
'C', 'F'}, optional, default: 'C'
Whether to store multi-dimensional data in row-major
(C-style) or column-major (Fortran-style) order in
memory.
like : array_like
Reference object to allow the creation of arrays which are not
NumPy arrays. If an array-like passed in as ``like`` supports
the ``__array_function__`` protocol, the result will be defined
by it. In this case, it ensures the creation of an array object
compatible with that passed in via this argument.
.. versionadded:: 1.20.0
Returns
-------
out : ndarray
Array of zeros with the given shape, dtype, and order.
See Also
--------
zeros_like : Return an array of zeros with shape and type of input.
empty : Return a new uninitialized array.
ones : Return a new array setting values to one.
full : Return a new array of given shape filled with value.
Examples
--------
>>> np.zeros(5)
array([ 0., 0., 0., 0., 0.])
>>> np.zeros((5,), dtype=int)
array([0, 0, 0, 0, 0])
>>> np.zeros((2, 1))
array([[ 0.],
[ 0.]])
>>> s = (2,2)
>>> np.zeros(s)
array([[ 0., 0.],
[ 0., 0.]])
>>> np.zeros((2,), dtype=[('x', 'i4'), ('y', 'i4')]) # custom dtype
array([(0, 0), (0, 0)],
dtype=[('x', '<i4'), ('y', '<i4')])
"""
About the meaning of the third parameter
直接上链接,This is the setting for record storage.
https://www.jb51.net/article/101882.htm
边栏推荐
猜你喜欢
随机推荐
- Datax3.0+DataX-Web builds distributed visual ETL system
- [Popular Science] What basic knowledge do I need to learn to engage in Web3?
- Original Questions for Level 5 of China Electronics Society Youth Grade Examination
- [Cloud Native--Kubernetes] Configuration Management
- Use Specification and Example to implement dynamic conditional query cases
- JMeter集合点
- JMeter关联执行
- JMeter代理录制手机app
- The origin of the name, concave language -, and moral
- [面试篇]Mysql 索引 BTree 与 B+Tree 的区别
- I set the global mapping table prefix in yml, but the database does not recognize it
- Simulate the realization of strcpy function (including multiple optimization ideas)
- Script for reverse generation of entity class, query and other interface xml of MySQL database
- 快速学会文件操作模块
- js simulates the function of dynamically deleting messages
- How to improve the quality of articles without being "recommended and affected" by the post assistant
- CSDN official plug-in
- C语言 结构体
- 【leetcode】8. 字符串转换整数 (atoi)
- "Digital reconstruction system, CEO is the first step"
- how to jump higher
- No, no, no, it's 2022, you don't know the principle of Jmeter, right?
- 测试用例设计方法-场景法详解
- 一文3000字解析Pytest单元测试框架【保姆级教程】
- 2022-08-05:以下go语言代码输出什么?A:65, string;B:A, string;C:65, int;D:报错。
- Jetpack WorkManager 看这一篇就够了~
- 关于np.zeros()第三个参数:c代表与c语言类似,行优先;F代表列优先的记录
- 腾讯云点播上传视频文件解决路径问题
- Parameter ‘courseId‘ not found. Available parameters are [arg1, arg0, param1, para
- LeetCode——345. 反转字符串中的元音字母
- LeetCode——1047. 删除字符串中的所有相邻重复项
- 山石发声 | 做好安全运营,没有你想象的那么难
- bpe 中文tokens
- dalle2:hierarchical text-conditional image generation with clip
- qwqの科技flag
- 2022海亮SC游记
- 20220803模拟
- 代码签名证书可以解决软件被杀毒软件报毒提醒吗?
- 使用aggird组件实现下滑请求分页从而实现无限滚动的效果
- 代码签名证书多少钱?