===========
NumPy C-API
===========
::
unsigned int
PyArray_GetNDArrayCVersion(void )
Included at the very first so not auto-grabbed and thus not labeled.
::
int
PyArray_SetNumericOps(PyObject *dict)
Set internal structure with number functions that all arrays will use
::
PyObject *
PyArray_GetNumericOps(void )
Get dictionary showing number functions that all arrays will use
::
int
PyArray_INCREF(PyArrayObject *mp)
For object arrays, increment all internal references.
::
int
PyArray_XDECREF(PyArrayObject *mp)
Decrement all internal references for object arrays.
(or arrays with object fields)
::
void
PyArray_SetStringFunction(PyObject *op, int repr)
Set the array print function to be a Python function.
::
PyArray_Descr *
PyArray_DescrFromType(int type)
Get the PyArray_Descr structure for a type.
::
PyObject *
PyArray_TypeObjectFromType(int type)
Get a typeobject from a type-number -- can return NULL.
New reference
::
char *
PyArray_Zero(PyArrayObject *arr)
Get pointer to zero of correct type for array.
::
char *
PyArray_One(PyArrayObject *arr)
Get pointer to one of correct type for array
::
PyObject *
PyArray_CastToType(PyArrayObject *arr, PyArray_Descr *dtype, int
is_f_order)
For backward compatibility
Cast an array using typecode structure.
steals reference to dtype --- cannot be NULL
This function always makes a copy of arr, even if the dtype
doesn't change.
::
int
PyArray_CastTo(PyArrayObject *out, PyArrayObject *mp)
Cast to an already created array.
::
int
PyArray_CastAnyTo(PyArrayObject *out, PyArrayObject *mp)
Cast to an already created array. Arrays don't have to be "broadcastable"
Only requirement is they have the same number of elements.
::
int
PyArray_CanCastSafely(int fromtype, int totype)
Check the type coercion rules.
::
npy_bool
PyArray_CanCastTo(PyArray_Descr *from, PyArray_Descr *to)
leaves reference count alone --- cannot be NULL
PyArray_CanCastTypeTo is equivalent to this, but adds a 'casting'
parameter.
::
int
PyArray_ObjectType(PyObject *op, int minimum_type)
Return the typecode of the array a Python object would be converted to
Returns the type number the result should have, or NPY_NOTYPE on error.
::
PyArray_Descr *
PyArray_DescrFromObject(PyObject *op, PyArray_Descr *mintype)
new reference -- accepts NULL for mintype
::
PyArrayObject **
PyArray_ConvertToCommonType(PyObject *op, int *retn)
This function is only used in one place within NumPy and should
generally be avoided. It is provided mainly for backward compatibility.
The user of the function has to free the returned array with PyDataMem_FREE.
::
PyArray_Descr *
PyArray_DescrFromScalar(PyObject *sc)
Return descr object from array scalar.
New reference
::
PyArray_Descr *
PyArray_DescrFromTypeObject(PyObject *type)
::
npy_intp
PyArray_Size(PyObject *op)
Compute the size of an array (in number of items)
::
PyObject *
PyArray_Scalar(void *data, PyArray_Descr *descr, PyObject *base)
Get scalar-equivalent to a region of memory described by a descriptor.
::
PyObject *
PyArray_FromScalar(PyObject *scalar, PyArray_Descr *outcode)
Get 0-dim array from scalar
0-dim array from array-scalar object
always contains a copy of the data
unless outcode is NULL, it is of void type and the referrer does
not own it either.
steals reference to outcode
::
void
PyArray_ScalarAsCtype(PyObject *scalar, void *ctypeptr)
Convert to c-type
no error checking is performed -- ctypeptr must be same type as scalar
in case of flexible type, the data is not copied
into ctypeptr which is expected to be a pointer to pointer
::
int
PyArray_CastScalarToCtype(PyObject *scalar, void
*ctypeptr, PyArray_Descr *outcode)
Cast Scalar to c-type
The output buffer must be large-enough to receive the value
Even for flexible types which is different from ScalarAsCtype
where only a reference for flexible types is returned
This may not work right on narrow builds for NumPy unicode scalars.
::
int
PyArray_CastScalarDirect(PyObject *scalar, PyArray_Descr
*indescr, void *ctypeptr, int outtype)
Cast Scalar to c-type
::
PyObject *
PyArray_ScalarFromObject(PyObject *object)
Get an Array Scalar From a Python Object
Returns NULL if unsuccessful but error is only set if another error occurred.
Currently only Numeric-like object supported.
::
PyArray_VectorUnaryFunc *
PyArray_GetCastFunc(PyArray_Descr *descr, int type_num)
Get a cast function to cast from the input descriptor to the
output type_number (must be a registered data-type).
Returns NULL if un-successful.
::
PyObject *
PyArray_FromDims(int NPY_UNUSED(nd) , int *NPY_UNUSED(d) , int
NPY_UNUSED(type) )
Deprecated, use PyArray_SimpleNew instead.
::
PyObject *
PyArray_FromDimsAndDataAndDescr(int NPY_UNUSED(nd) , int
*NPY_UNUSED(d) , PyArray_Descr
*descr, char *NPY_UNUSED(data) )
Deprecated, use PyArray_NewFromDescr instead.
::
PyObject *
PyArray_FromAny(PyObject *op, PyArray_Descr *newtype, int
min_depth, int max_depth, int flags, PyObject
*context)
Does not check for NPY_ARRAY_ENSURECOPY and NPY_ARRAY_NOTSWAPPED in flags
Steals a reference to newtype --- which can be NULL
::
PyObject *
PyArray_EnsureArray(PyObject *op)
This is a quick wrapper around
PyArray_FromAny(op, NULL, 0, 0, NPY_ARRAY_ENSUREARRAY, NULL)
that special cases Arrays and PyArray_Scalars up front
It *steals a reference* to the object
It also guarantees that the result is PyArray_Type
Because it decrefs op if any conversion needs to take place
so it can be used like PyArray_EnsureArray(some_function(...))
::
PyObject *
PyArray_EnsureAnyArray(PyObject *op)
::
PyObject *
PyArray_FromFile(FILE *fp, PyArray_Descr *dtype, npy_intp num, char
*sep)
Given a ``FILE *`` pointer ``fp``, and a ``PyArray_Descr``, return an
array corresponding to the data encoded in that file.
The reference to `dtype` is stolen (it is possible that the passed in
dtype is not held on to).
The number of elements to read is given as ``num``; if it is < 0, then
then as many as possible are read.
If ``sep`` is NULL or empty, then binary data is assumed, else
text data, with ``sep`` as the separator between elements. Whitespace in
the separator matches any length of whitespace in the text, and a match
for whitespace around the separator is added.
For memory-mapped files, use the buffer interface. No more data than
necessary is read by this routine.
::
PyObject *
PyArray_FromString(char *data, npy_intp slen, PyArray_Descr
*dtype, npy_intp num, char *sep)
Given a pointer to a string ``data``, a string length ``slen``, and
a ``PyArray_Descr``, return an array corresponding to the data
encoded in that string.
If the dtype is NULL, the default array type is used (double).
If non-null, the reference is stolen.
If ``slen`` is < 0, then the end of string is used for text data.
It is an error for ``slen`` to be < 0 for binary data (since embedded NULLs
would be the norm).
The number of elements to read is given as ``num``; if it is < 0, then
then as many as possible are read.
If ``sep`` is NULL or empty, then binary data is assumed, else
text data, with ``sep`` as the separator between elements. Whitespace in
the separator matches any length of whitespace in the text, and a match
for whitespace around the separator is added.
没有合适的资源?快使用搜索试试~ 我知道了~
基于Python的电影数据爬取与数据可视化的项目(源码+文档).zip (高分可运行项目)
共2000个文件
py:1855个
txt:47个
c:41个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 164 浏览量
2024-05-07
00:07:19
上传
评论
收藏 60.17MB ZIP 举报
温馨提示
基于Python的电影数据爬取与数据可视化可以帮助我们获取电影相关的数据并将其可视化展示出来。以下是一个简单的步骤: 1. 数据爬取:使用Python的网络爬虫库(如BeautifulSoup、Scrapy)从电影相关的网站或API获取电影数据。可以抓取电影的基本信息(如片名、上映时间、导演、演员信息)以及与电影相关的数据(如票房收入、评分、评论等)。可以根据需要选择爬取的网站或API,并编写相应爬虫代码进行数据抓取。 2. 数据清洗和转换:使用Python的数据处理库(如Pandas)对获取到的电影数据进行清洗和转换。可以去除重复值、处理缺失值、格式转换等,以确保数据的质量和一致性。可以使用Pandas库的DataFrame对象来管理和操作数据。 3. 数据可视化:使用Python的数据可视化库(如Matplotlib、Seaborn、Plotly)对电影数据进行可视化展示。可以绘制各种图表,如折线图、柱状图、散点图、饼图等,来展示电影数据的分布和趋势。可以根据不同的要求和需求,选择适合的可视化方式来展示数据。 4. 可视化交互:使用Python的交互式可视化库(如Plotl
资源推荐
资源详情
资源评论
收起资源包目录
基于Python的电影数据爬取与数据可视化的项目(源码+文档).zip (高分可运行项目) (2000个子文件)
fortranobject.c 38KB
wrapmodule.c 7KB
_speedups.c 7KB
extra_avx512f_reduce.c 2KB
cpu_avx512_knm.c 1KB
cpu_popcnt.c 1KB
cpu_avx512_skx.c 1KB
cpu_avx512_icl.c 1KB
cpu_avx512_knl.c 981B
extra_vsx_asm.c 981B
cpu_avx512_cnl.c 972B
cpu_f16c.c 890B
cpu_avx512_clx.c 864B
cpu_fma3.c 839B
cpu_avx.c 799B
cpu_avx512cd.c 779B
cpu_avx512f.c 775B
cpu_avx2.c 769B
cpu_asimd.c 729B
cpu_ssse3.c 725B
cpu_sse2.c 717B
cpu_sse42.c 712B
cpu_sse3.c 709B
cpu_sse.c 706B
cpu_sse41.c 695B
extra_avx512bw_mask.c 654B
extra_avx512dq_mask.c 520B
cpu_neon_vfpv4.c 512B
cpu_vsx.c 499B
cpu_asimdfhm.c 448B
cpu_asimddp.c 395B
cpu_neon.c 387B
limited_api.c 361B
cpu_asimdhp.c 343B
cpu_fma4.c 314B
cpu_vsx2.c 276B
cpu_vsx3.c 263B
cpu_neon_fp16.c 262B
cpu_xop.c 246B
gfortran_vs2003_hack.c 83B
test_flags.c 17B
generate_umath_validation_data.cpp 6KB
style.css 6KB
boilerplate.css 2KB
page.css 2KB
mpl.css 2KB
fbm.css 2KB
plot_directive.css 334B
libdivide.h 80KB
ndarraytypes.h 70KB
__multiarray_api.h 63KB
npy_common.h 39KB
npy_math.h 21KB
npy_3kcompat.h 16KB
experimental_dtype_api.h 14KB
__ufunc_api.h 13KB
ufuncobject.h 12KB
ndarrayobject.h 11KB
distributions.h 10KB
noprefix.h 7KB
old_defines.h 6KB
npy_cpu.h 5KB
fortranobject.h 4KB
npy_1_7_deprecated_api.h 4KB
arrayscalars.h 4KB
npy_endian.h 3KB
numpyconfig.h 2KB
halffloat.h 2KB
npy_interrupt.h 2KB
_neighborhood_iterator_imp.h 2KB
utils.h 1KB
npy_os.h 937B
oldnumeric.h 931B
_numpyconfig.h 891B
npy_no_deprecated_api.h 698B
bitgen.h 508B
arrayobject.h 294B
all_figures.html 2KB
ipython_inline_figure.html 1KB
single_figure.html 1KB
mpl.js 23KB
nbagg_mpl.js 10KB
.eslintrc.js 698B
mpl_tornado.js 310B
package.json 563B
LICENSE.md 1KB
matplotlib.pdf 22KB
hand.pdf 4KB
move.pdf 2KB
help.pdf 2KB
home.pdf 2KB
filesave.pdf 2KB
subplots.pdf 2KB
forward.pdf 2KB
back.pdf 2KB
zoom_to_rect.pdf 2KB
qt4_editor_options.pdf 2KB
test_multiarray.py 349KB
_axes.py 318KB
core.py 269KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
荒野大飞
- 粉丝: 9560
- 资源: 519
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功