code: def _forwards_interpolate_numba(
      spot_arr,
      spot_delivery_days_arr,
      quoted_delivery_days_arr,
      forwards_points_arr,
      no_of_tenors,
      out,
  ):
      for i, delivery_day in enumerate(spot_delivery_days_arr):
          for j in range(no_of_tenors):
              # curr_forward_pts = forwards_points_arr[i, j]
              # curr_delivery_days = quoted_delivery_days_arr[i, j]
              # next_forward_pts = forwards_points_arr[i, j+1]
              # next_delivery_days = quoted_delivery_days_arr[i, j+1]
  
              # In other words, SP (Spot)
              if delivery_day == 0:
                  out[i] = spot_arr[i]
  
                  break
  
              # Say if we're in between SP and 1W
              elif delivery_day <= quoted_delivery_days_arr[i, j]:
                  out[i] = (
                      spot_arr[i]
                      + (
                          forwards_points_arr[i, j]
                          / quoted_delivery_days_arr[i, j]
                      )
                      * delivery_day
                  )
  
                  break
              # Eg. if we're in between 1W and 2W
              elif (
                  delivery_day >= quoted_delivery_days_arr[i, j]
                  and delivery_day <= quoted_delivery_days_arr[i, j + 1]
              ):
                  # Alternative interpolation
                  # interpolated_forwards_arr[i] = spot_arr[i] + \
                  #                                delivery_day * (forwards_points_arr[i, j+1] - forwards_points_arr[i, j]) \
                  #                                / (quoted_delivery_days_arr[i, j+1] - quoted_delivery_days_arr[i, j])
  
                  forward_points_per_day = (
                      forwards_points_arr[i, j + 1]
                      - forwards_points_arr[i, j]
                  ) / (
                      quoted_delivery_days_arr[i, j + 1]
                      - quoted_delivery_days_arr[i, j]
                  )
  
                  out[i] = (
                      spot_arr[i]
                      + forward_points_per_day * delivery_day
                      + forwards_points_arr[i, j]
                      - (
                          forward_points_per_day
                          * quoted_delivery_days_arr[i, j]
                      )
                  )
  
                  break
  
file_path: finmarketpy/finmarketpy/curve/rates/fxforwardspricer.py
imports: import numpy
  import pandas
  from numba import guvectorize
  from findatapy.timeseries import Calendar
  from finmarketpy.util.marketconstants import MarketConstants
  from finmarketpy.curve.abstractpricer import AbstractPricer
label_desc: Use image node_id 1 for calling a global function with example usage: _forwards_interpolate_numba(spot_arr, spot_delivery_days_arr, quoted_delivery_days_arr, forwards_points_arr, no_of_tenors, out) without return types