Skip to content

Commit

Permalink
Renamed get_idx_type to get_index_type
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Mar 3, 2024
1 parent 3025cee commit f45718e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ext/polars/src/functions/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use polars_core::POOL;
use crate::conversion::Wrap;
use crate::{RbResult, RbValueError};

pub fn get_idx_type() -> Value {
pub fn get_index_type() -> Value {
Wrap(IDX_DTYPE).into_value()
}

Expand Down
5 changes: 4 additions & 1 deletion ext/polars/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,10 @@ fn init(ruby: &Ruby) -> RbResult<()> {
"dtype_str_repr",
function!(functions::misc::dtype_str_repr, 1),
)?;
class.define_singleton_method("get_idx_type", function!(functions::meta::get_idx_type, 0))?;
class.define_singleton_method(
"get_index_type",
function!(functions::meta::get_index_type, 0),
)?;
class.define_singleton_method(
"threadpool_size",
function!(functions::meta::threadpool_size, 0),
Expand Down
2 changes: 1 addition & 1 deletion lib/polars/data_frame.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4948,7 +4948,7 @@ def _pos_idx(idx, dim)
end

def _pos_idxs(idxs, dim)
idx_type = Plr.get_idx_type
idx_type = Plr.get_index_type

if idxs.is_a?(Series)
if idxs.dtype == idx_type
Expand Down
2 changes: 1 addition & 1 deletion lib/polars/series.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4154,7 +4154,7 @@ def coerce(other)
end

def _pos_idxs(idxs)
idx_type = Plr.get_idx_type
idx_type = Plr.get_index_type

if idxs.is_a?(Series)
if idxs.dtype == idx_type
Expand Down

0 comments on commit f45718e

Please sign in to comment.