def test_modify_view_component(matrix_type, mapping_name):
    adata = ad.AnnData(
        np.zeros((10, 10)),
        **{mapping_name: dict(m=matrix_type(asarray(sparse.random(10, 10))))},
    )
    init_hash = joblib.hash(adata)

    subset = adata[:5, :][:, :5]
    assert subset.is_view
    m = getattr(subset, mapping_name)["m"]
    m[0, 0] = 100
    assert not subset.is_view
    assert getattr(subset, mapping_name)["m"][0, 0] == 100

    assert init_hash == joblib.hash(adata)
def draw(self, context):
        layout = self.layout

        layout.operator(
                "wm.url_open", text="Add-ons Catalog", icon='URL',
                ).url = "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts"

        layout.separator()

        layout.operator(
                "wm.url_open", text="How to share your add-on", icon='URL',
                ).url = "http://wiki.blender.org/index.php/Dev:Py/Sharing"
        layout.operator(
                "wm.url_open", text="Add-on Guidelines", icon='URL',
                ).url = "http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons"
        layout.operator(
                "wm.url_open", text="API Concepts", icon='URL',
                ).url = bpy.types.WM_OT_doc_view._prefix + "/info_quickstart.html"
        layout.operator("wm.url_open", text="Add-on Tutorial", icon='URL',
                ).url = "http://www.blender.org/api/blender_python_api_current/info_tutorial_addon.html"