Method: TensorStream::Packer.pack_to_str
- Defined in:
- lib/tensor_stream/graph_serializers/packer.rb
.pack_to_str(value, data_type) ⇒ Object
38 39 40 |
# File 'lib/tensor_stream/graph_serializers/packer.rb', line 38 def self.pack_to_str(value, data_type) pack(value, data_type).bytes.map { |b| /[^[:print:]]/.match?(b.chr) ? "\\#{sprintf("%o", b).rjust(3, "0")}" : b.chr }.join end |