4227f7c2810a6fc48165311e19a4a6aaac38475e,astroML/datasets/sdss_specgals.py,,fetch_sdss_specgals,#,15

Before Change


        open(archive_file, "wb").write(fitsdata)

    hdulist = fits.open(archive_file)
    return np.asarray(hdulist[1].data)


def fetch_great_wall(data_home=None, download_if_missing=True,

After Change


    archive_file1 = os.path.join(data_home, os.path.basename(DATA_URL1))
    archive_file2 = os.path.join(data_home, os.path.basename(DATA_URL2))

    if not (os.path.exists(archive_file1) and os.path.exists(archive_file2)):
        if not download_if_missing:
            raise IOError("data not present on disk. "
                          "set download_if_missing=True to download")

        for url, name in zip([DATA_URL1, DATA_URL2],
                             [archive_file1, archive_file2]):
            data = Table.read(url)
            data.write(name)

    data1 = Table.read(archive_file1)
    data2 = Table.read(archive_file2)

    data = vstack([data1, data2])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: astroML/astroML
Commit Name: 4227f7c2810a6fc48165311e19a4a6aaac38475e
Time: 2019-04-16
Author: bsipocz@gmail.com
File Name: astroML/datasets/sdss_specgals.py
Class Name:
Method Name: fetch_sdss_specgals


Project Name: timbmg/Sentence-VAE
Commit Name: 9e94aa28133b75152f90b2b63f30c17b377c9748
Time: 2018-03-08
Author: baumgaertner.t@gmail.com
File Name: train.py
Class Name:
Method Name: main


Project Name: daavoo/pyntcloud
Commit Name: 4737b92f63170d4d27a1335908995827a501c1df
Time: 2017-05-08
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/learn/datasets/modelnet.py
Class Name:
Method Name: get_and_setup_modelnet


Project Name: xinntao/BasicSR
Commit Name: 29ab5e1965503be3ffe87462e973edf1d457af6e
Time: 2018-09-06
Author: wxt1994@126.com
File Name: codes/scripts/extract_subimgs_single.py
Class Name:
Method Name: main