← Back
Editing: _fetchers.cpython-311.pyc
� d�cg � � � d dl mZmZmZ ddlmZmZ d dlZ ej ej d� � dee�� � Z n# e$ r dZdZ Y nw xY we fd�Zd � Z d � Zd d�ZdS )� )�array� frombuffer�load� )�registry� registry_urlsNz scipy-datazhttps://github.com/scipy/)�path�base_urlr �urlsc �N � |�t d� � �|� | � � S )NzsMissing optional dependency 'pooch' required for scipy.datasets module. Please use pip or conda to install 'pooch'.)�ImportError�fetch)�dataset_name�data_fetchers �:/usr/lib/python3/dist-packages/scipy/datasets/_fetchers.py� fetch_datar s5 � ���� 6� 7� 7� 7� ���l�+�+�+� c � � ddl } t d� � }t |d� � 5 }t | � |� � � � }ddd� � n# 1 swxY w Y |S )a� Get an 8-bit grayscale bit-depth, 512 x 512 derived image for easy use in demos. The image is derived from accent-to-the-top.jpg at http://www.public-domain-image.com/people-public-domain-images-pictures/ Parameters ---------- None Returns ------- ascent : ndarray convenient image to use for testing and demonstration Examples -------- >>> import scipy.datasets >>> ascent = scipy.datasets.ascent() >>> ascent.shape (512, 512) >>> ascent.max() 255 >>> import matplotlib.pyplot as plt >>> plt.gray() >>> plt.imshow(ascent) >>> plt.show() r Nz ascent.dat�rb)�pickler �openr r )r �fname�f�ascents r r r "