Use a binary search for the bin content index determination when using a generic axis. Also make the weight parameter for the fill method optional. Its default is 1 if set to None.