e358b26eaf21f4ea1c20ad1835a0cab7b86ce1e5,third_party/nucleus/util/vis.py,,save_to_png,#Any#Any#Any#Any#Any#Any#,271

Before Change


  // Saving to a temporary file is needed even when showing in a notebook
  if path is None:
    path = "/tmp/tmp.png"
  img.save(path)

  // Show image (great for notebooks)
  if show:
    display.display(display.Image(path))

After Change


  // Saving to a temporary file is needed even when showing in a notebook
  if path is None:
    path = "/tmp/tmp.png"
  with gfile.Open(path, "wb") as fout:
    img.save(fout, format=path.split(".")[-1])

  // Show image (great for notebooks)
  if show:
    display.display(display.Image(path))

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: google/deepvariant
Commit Name: e358b26eaf21f4ea1c20ad1835a0cab7b86ce1e5
Time: 2020-06-22
Author: pichuan@google.com
File Name: third_party/nucleus/util/vis.py
Class Name:
Method Name: save_to_png


Project Name: NervanaSystems/nlp-architect
Commit Name: 838473cfb15599030b0e777b9a9901e22409a9b1
Time: 2018-07-11
Author: peter.izsak@intel.com
File Name: nlp_architect/models/chunker.py
Class Name: SequenceChunker
Method Name: save


Project Name: tsurumeso/waifu2x-chainer
Commit Name: 97aeda2a947c44cdef91d9276c2c38c02f37cda1
Time: 2017-02-08
Author: nstm101339@gmail.com
File Name: lib/iproc.py
Class Name:
Method Name: array_to_wand