46、'memoryview',  返回给定参数的内存查看对象(Momory view)。所谓内存查看对象,是指对支持缓冲区协议的数据进行包装,在不需要复制对象基础上允许Python代码访问。

class memoryview(object)
| Create a new memoryview object which references the given object.
|
| Methods defined here:
|
| __delitem__(self, key, /)
| Delete self[key].
|
| __enter__(...)
|
| __eq__(self, value, /)
| Return self==value.
|
| __exit__(...)
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self<value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| __repr__(self, /)
| Return repr(self).
|
| __setitem__(self, key, value, /)
| Set self[key] to value.
|
| cast(self, /, format, *, shape)
| Cast a memoryview to a new format or shape.
|
| hex(self, /)
| Return the data in the buffer as a string of hexadecimal numbers.
|
| release(self, /)
| Release the underlying buffer exposed by the memoryview object.
|
| tobytes(self, /)
| Return the data in the buffer as a byte string.
|
| tolist(self, /)
| Return the data in the buffer as a list of elements.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| c_contiguous
| A bool indicating whether the memory is C contiguous.
|
| contiguous
| A bool indicating whether the memory is contiguous.
|
| f_contiguous
| A bool indicating whether the memory is Fortran contiguous.
|
| format
| A string containing the format (in struct module style)
| for each element in the view.
|
| itemsize
| The size in bytes of each element of the memoryview.
|
| nbytes
| The amount of space in bytes that the array would use in
| a contiguous representation.
|
| ndim
| An integer indicating how many dimensions of a multi-dimensional
| array the memory represents.
|
| obj
| The underlying object of the memoryview.
|
| readonly
| A bool indicating whether the memory is read only.
|
| shape
| A tuple of ndim integers giving the shape of the memory
| as an N-dimensional array.
|
| strides
| A tuple of ndim integers giving the size in bytes to access
| each element for each dimension of the array.
|
| suboffsets
| A tuple of integers used internally for PIL-style arrays.

  

python __builtins__ memoryview类 (46)的更多相关文章

  1. python __builtins__ staticmethod类 (64)

    64.'staticmethod', 返回静态方法 class staticmethod(object) | staticmethod(function) -> method | | Conve ...

  2. python __builtins__ help类 (32)

    32.'help', 接收对象作为参数,更详细地返回该对象的所有属性和方法 class _Helper(builtins.object) | Define the builtin 'help'. | ...

  3. python __builtins__ float类 (25)

    25.'float', 用于将整数和字符串转换成浮点数. class float(object) | float(x) -> floating point number | | Convert ...

  4. python __builtins__ classmethod类 (11)

    11.'classmethod', 修饰符对应的函数不需要实例化,不需要 self 参数,但第一个参数需要是表示自身类的 cls 参数,可以来调用类的属性,类的方法,实例化对象等. class cla ...

  5. python __builtins__ bool类 (6)

    6.'bool',  函数用于将给定参数转换为布尔类型,如果没有参数,返回 False. class bool(int) # 继承于int类型 | bool(x) -> bool # 创建boo ...

  6. python __builtins__ zip类 (71)

    71.'zip' , 函数用于将可迭代的对象作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的列表.如果各个迭代器的元素个数不一致,则返回列表长度与最短的对象相同,利用 * 号操作 ...

  7. python __builtins__ type类 (69)

    69.'type', 返回对象类型 class type(object) | type(object_or_name, bases, dict) | type(object) -> the ob ...

  8. python __builtins__ tuple类 (68)

    68.'tuple', 转换为元组类型 class tuple(object) | tuple() -> empty tuple | tuple(iterable) -> tuple in ...

  9. python __builtins__ str类 (65)

    65.'str', 字节转换成字符串.第一个传入参数是要转换的字节,第二个参数是按什么编码转换成字符串 class str(object) | str(object='') -> str | s ...

随机推荐

  1. 微信小程序 - 音频播放(1.2版本和1.2版本之后)

    不多说了,直接贴code // 1.2版本以后便不在维护 wx.getBackgroundAudioManager({ success:function(res){ var status =res.s ...

  2. 关于 redux-saga 中 take 使用方法详解

    本文介绍了关于redux-saga中take使用方法详解,分享给大家,具体如下: 带来一个自己研究好久的API使用方法. redux-saga中effect中take这个API使用方式,用的多的是ca ...

  3. pcapReader——源代码分析

    一.简单介绍 pcapReader是ndpi开源中的一个example. 大家能够从<ndpi directory>/example/pcapReader.c中找到它的源码.通过pcapl ...

  4. C#读取指定路径下的Config配置文件

    ExeConfigurationFileMap map = new ExeConfigurationFileMap(); map.ExeConfigFilename = @"F:\App1. ...

  5. Simple calculations

    Description 有一个包括n+2个元素的数列a0, a1, ..., an+1 (n <= 3000, -1000 <= ai <=1000).它们之间满足ai = (ai- ...

  6. jmeter3.0_bodydata中存在中文乱码

    jmeter3.0_bodydata中存在中文乱码 1.进入jmeter.properties配置文件 找到#jsyntaxtextarea.font.family=Hack ,并将“#”取消并重启j ...

  7. python的对象的属性(即对象的成员)是动态的

    1 python的对象的成员叫attribute 2 python的类的成员是可以动态创建的 因此,在用的时候也提供了三个内建的接口来对类的成员进行操作 2.1 getattr() 2.2 hasat ...

  8. Designing a RESTful API with Python and Flask 201

    rest服务器的搭建 - CSDN博客 http://blog.csdn.net/zhanghaotian2011/article/details/8760794 REST的架构设计 REST(Rep ...

  9. Java中数组复制的几种方式以及数组合并

    1.Object.clone() 简单直接,只能对源数组完整地复制 2.Arrays.copyOf(T[] original, int newLength) 可以只复制源数组中部分元素,但复制的起始位 ...

  10. spring-jar包详解整理(大合集)

    转:https://blog.csdn.net/weisong530624687/article/details/50888094 spring.jar 是包含有完整发布模块的单个jar 包.但是不包 ...