2c5f22199b46837b9801378ce172dcd13f125769,gluonnlp/vocab/subwords.py,ByteSubwords,__call__,#ByteSubwords#Any#,120
Before Change
def __call__(self, words):
return [
nd.array(np.frombuffer(word.encode(self.encoding), dtype=np.uint8).astype(np.int_))
for word in words
]
After Change
if sys.version_info[0] == 3:
return [list(word.encode(self.encoding)) for word in words]
else:
return [
list((ord(c) for c in word.encode(self.encoding)))
for word in words
]
def __len__(self):
return 256
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: dmlc/gluon-nlp
Commit Name: 2c5f22199b46837b9801378ce172dcd13f125769
Time: 2018-07-17
Author: leonard@lausen.nl
File Name: gluonnlp/vocab/subwords.py
Class Name: ByteSubwords
Method Name: __call__
Project Name: lene/nn-wtf
Commit Name: 5787acbd4e5d7ebd6b52b8d058f12c0f91682b97
Time: 2016-02-19
Author: lene.preuss@gmail.com
File Name: input_data.py
Class Name:
Method Name: extract_images
Project Name: biotite-dev/biotite
Commit Name: 87f9a966568d17ccdbb201ace2f39f781c51e683
Time: 2020-09-16
Author: patrick.kunzm@gmail.com
File Name: src/biotite/sequence/io/fastq/file.py
Class Name: FastqFile
Method Name: get_quality