def peptides_to_network_input(self, peptides):
encoder = EncodableSequences.create(peptides)<EOL>if (self.hyperparameters['<STR_LIT>'] == "<STR_LIT>"):<EOL><INDENT>encoded = encoder.variable_length_to_fixed_length_categorical(<EOL>max_length=self.hyperparameters['<STR_LIT>'],<EOL>**self.input_encoding_hyperparameter_defaults.subselect(<EOL>self.hyperparameters))<EOL><DEDENT>elif (<EOL>self.hyperparameters['<STR_LIT>'] in<EOL>available_vector_encodings()):<EOL><INDENT>encoded = encoder.variable_length_to_fixed_length_vector_encoding(<EOL>self.hyperparameters['<STR_LIT>'],<EOL>max_length=self.hyperparameters['<STR_LIT>'],<EOL>**self.input_encoding_hyperparameter_defaults.subselect(<EOL>self.hyperparameters))<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" %<EOL>self.hyperparameters['<STR_LIT>'])<EOL><DEDENT>assert len(encoded) == len(peptides)<EOL>return encoded<EOL>
Encode peptides to the fixed-length encoding expected by the neural
network (which depends on the architecture).

Parameters
----------
peptides : EncodableSequences or list of string

Returns
-------
numpy.array