Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work to refactor amuse.rfi #1078

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
4 changes: 2 additions & 2 deletions src/amuse/io/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,9 @@ def read_fortran_block_float_vectors(self, file, size=3):
result = self.read_fortran_block_floats(file)
return result.reshape(len(result) // size, size)

def write_fortran_block(self, file, input):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this code do? Is there anything affected by this?

def write_fortran_block(self, file, input_raw):
fileformat = self.endianness + "I"
input_bytes = bytearray(fileformat)
input_bytes = bytearray(input_raw)
length_of_block = len(input_bytes)
file.write(struct.pack(fileformat, length_of_block))
file.write(input_bytes)
Expand Down