or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
Developer Summit 2023 report:
scipy.sparse
Date: May 26, 2023
Contributors: CJ, Julien, Isaac, Dan, Ross, Stéfan, Levi, Sebastian
Context
scipy.sparse
provides a widely-used set of types for working with sparse data, which mimic thenumpy.matrix
API. As the community continues to move away from matrix semantics, we want to provide a sparse array-like API that follows modern conventions.This involves a lot of work, including some necessary churn for end-users, but it also provides a unique opportunity to re-evaluate many design choices that have accumulated over the last 20+ years of SciPy development.
What we accomplished
isinstance
checking.isinstance(..., sparray)
now selects only sparse arraysisinstance(..., spmatrix)
now selects only sparse matrices_spbase
) underpins all sparse container types.isspmatrix
andisspmatrix_<fmt>
helper functions to better reflect their name (see gh-18528).isspmatrix*
now only returnTrue
for sparse matrices, not sparse arrays.issparse
is the recommended function to check for either array or matrix sparse containers.isspmatrix
and the associatedisspmatrix_<fmt>
functions was replaced withissparse
andisinstance
checks, as appropriate.sparray
interface, leavingspmatrix
untouched for backward compatibility:asfptype
,getrow
,getcol
,getnnz
,getformat
..H
and.A
attributes in sparse array classes.sparray
doesn't downcast index arrays from 64-bit to 32-bit.scipy.sparse
namespace. For example,scipy.sparse.diags_array()
will act likescipy.sparse.diags()
but return a sparse array instead of a sparse matrix.scipy.sparse.array
namespace. This would complicate the process of incrementally updating dependent library code, as upgrades would need to be performed in an all-or-nothing fashion.array=None
keyword argument to each existing creation function. This would make it hard to change other arguments and clean up the API going forward.isshape
andcheck_shape
to optionally handle non-2d shapes.coo_array
support (see gh-18530).__array_ufunc__
and other__array_*__
protocols for sparse arraysnp.argsort(..., kind='stable')
What remains to be done
coo_array
to support n-dimensional shapes.dps_array
in 2d gh-18514 and then 1d.scipy.sparse.eye
+ friends.eye
,random
, and others.spdiags
,rand
andidentity
.isspmatrix_<fmt>
functions now that the class hierarchy forsparray
andspmatrix
has been adjusted. To check for a particular format, users can writex.format == 'coo'
.scipy.sparse.sparray
scipy.sparse.isspmatrix_*